Agar.io Username Teleport Cheat

Teleport to a player by username in Agar.io (client-side)

  1. // ==UserScript==
  2. // @name Agar.io Username Teleport Cheat
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Teleport to a player by username in Agar.io (client-side)
  6. // @author ProDev
  7. // @match *://agar.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. let ws; // WebSocket connection reference
  15. let players = {}; // Store players data by their ID
  16.  
  17. // Create the GUI
  18. const gui = document.createElement('div');
  19. gui.style.position = 'fixed';
  20. gui.style.top = '10px';
  21. gui.style.left = '10px';
  22. gui.style.background = 'white';
  23. gui.style.border = '2px solid black';
  24. gui.style.zIndex = '9999';
  25. gui.style.padding = '10px';
  26. const input = document.createElement('input');
  27. input.type = 'text';
  28. input.placeholder = 'Enter Username';
  29. gui.appendChild(input);
  30. const button = document.createElement('button');
  31. button.innerHTML = 'Teleport';
  32. gui.appendChild(button);
  33. document.body.appendChild(gui);
  34.  
  35. // Function to simulate teleportation
  36. function teleportToCoordinates(x, y) {
  37. if (ws && ws.readyState === WebSocket.OPEN) {
  38. // Create the movement packet
  39. let teleportPacket = new DataView(new ArrayBuffer(21));
  40. teleportPacket.setUint8(0, 16); // Message type for movement
  41. teleportPacket.setFloat32(1, x, true);
  42. teleportPacket.setFloat32(5, y, true);
  43. teleportPacket.setUint32(9, 0, true); // Simulated mass (0 for default)
  44. ws.send(teleportPacket.buffer);
  45. }
  46. }
  47.  
  48. // Find the player by username and attempt to teleport
  49. button.addEventListener('click', function() {
  50. const targetUsername = input.value.trim();
  51. if (!targetUsername) {
  52. alert('Enter a username');
  53. return;
  54. }
  55.  
  56. // Find player by username
  57. for (let playerId in players) {
  58. if (players[playerId].name === targetUsername) {
  59. teleportToCoordinates(players[playerId].x, players[playerId].y);
  60. return;
  61. }
  62. }
  63.  
  64. alert('Player not found!');
  65. });
  66.  
  67. // Intercept the WebSocket connection
  68. const originalWebSocket = window.WebSocket;
  69. window.WebSocket = function(url, protocols) {
  70. ws = new originalWebSocket(url, protocols);
  71.  
  72. ws.addEventListener('message', function(event) {
  73. const data = new DataView(event.data);
  74.  
  75. // Here we attempt to parse the incoming WebSocket messages
  76. // This is where you'd capture player positions
  77.  
  78. // For demo purposes: Assume the server sends player info in a specific way
  79. const type = data.getUint8(0); // Example: message type 16 for movement updates
  80.  
  81. if (type === 16) {
  82. const playerId = data.getUint32(1, true); // Player ID (example)
  83. const x = data.getFloat32(5, true); // X coordinate
  84. const y = data.getFloat32(9, true); // Y coordinate
  85.  
  86. const playerName = 'Unknown'; // Replace with actual logic to extract player names
  87. players[playerId] = { x, y, name: playerName };
  88. }
  89. });
  90.  
  91. return ws;
  92. };
  93.  
  94. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址