Advertisement
Guest User

Untitled

a guest
May 24th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.bots = [];
  2. window.encryptionKey = 0;
  3. window.onConnect = () => {
  4.   window.gotKey = false;
  5. }
  6.  
  7. class Client {
  8.     constructor() {
  9.         this.botServerIP = 'ws://lmlmlmlmdzd-powerheadfr.c9users.io:8081';
  10.         this.botServerStatus = '';
  11.         this.agarServer = '';
  12.         this.botNick = '';
  13.         this.UUID = '';
  14.         this.botAmount = 500;
  15.         this.moveInterval = null;
  16.         this.ws = null;
  17.         this.reconnect = true;
  18.         this.addListener();
  19.         this.connect();
  20.     }
  21.  
  22.     connect() {
  23.         this.ws = new WebSocket(this.botServerIP);
  24.         this.ws.binaryType = 'arraybuffer';
  25.         this.ws.onopen = this.onopen.bind(this);
  26.         this.ws.onmessage = this.onmessage.bind(this);
  27.         this.ws.onclose = this.onclose.bind(this);
  28.         this.ws.onerror = this.onerror.bind(this);
  29.     }
  30.  
  31.     onopen() {
  32.         console.log('Connection to bot server open');
  33.         $('#serverStatus').text('Connected');
  34.         this.sendUUID();
  35.         this.startMoveInterval();
  36.     }
  37.  
  38.     onmessage(msg) {
  39.         let buf = new DataView(msg.data);
  40.         let offset = 0;
  41.         let opcode = buf.getUint8(offset++);
  42.         if ($("#reconnectButton").prop('disabled', false)) {
  43.             $("#reconnectButton").prop('disabled', true);
  44.         }
  45.         switch (opcode) {
  46.             case 0:
  47.                 {
  48.                     let addClasses = '';
  49.                     let removeClasses = '';
  50.                     switch (buf.getUint8(offset++)) {
  51.                         case 0:
  52.                             this.botServerStatus = 'Max сonnections';
  53.                             this.reconnect = false;
  54.                             break;
  55.                         case 1:
  56.                             this.botServerStatus = 'Invalid Data';
  57.                             this.reconnect = false;
  58.                             break;
  59.                         case 2:
  60.                             this.botServerStatus = 'IP limit';
  61.                             this.reconnect = false;
  62.                             break;
  63.                         case 3:
  64.                             this.botServerStatus = 'auth...';
  65.                             break;
  66.                         case 4:
  67.                             this.botServerStatus = 'Ready';
  68.                             $('#toggleButton').replaceWith(`<button id='toggleButton' onclick='window.client.startBots();' class='btn btn-success'>Start Bots</button>`);
  69.                             $("#botCounter").html("0/0");
  70.                             window.bots = [];
  71.                             break;
  72.                         case 5:
  73.                             this.botServerStatus = 'UUID not auth';
  74.                             this.reconnect = false;
  75.                             break;
  76.                         case 6:
  77.                             this.botServerStatus = 'Getting proxies';
  78.                             break;
  79.                         case 7:
  80.                             this.botServerStatus = 'Bots started!';
  81.                             break;
  82.                         case 8:
  83.                             this.botServerStatus = 'Auth error!';
  84.                             this.reconnect = false;
  85.                             break;
  86.                         case 9:
  87.                             this.botServerStatus = 'Invalid server';
  88.                             break;
  89.                         case 10:
  90.                             this.botServerStatus = 'Not party server.';
  91.                             $('#toggleButton').replaceWith(`<button id='toggleButton' onclick='window.client.startBots();' class='btn btn-success'>Start Bots</button>`);
  92.                             break;
  93.                         case 11:
  94.                             this.botServerStatus = 'Coins are over!';
  95.                             this.reconnect = false;
  96.                             break;
  97.                         case 12:
  98.                             this.botServerStatus = 'Server in maintenance...';
  99.                             this.reconnect = false;
  100.                             break;
  101.                         case 13:
  102.                             this.totalUsers = buf.getUint8(offset++, true);
  103.                             $("#userStatus").css("display", "block");
  104.                             $("#usersCounter").text(this.totalUsers);
  105.                             break;
  106.                     }
  107.                     $("#serverStatus").text(this.botServerStatus);
  108.                 }
  109.                 break;
  110.             case 1:
  111.                 {
  112.                     let spawnedBots = buf.getUint16(offset, true);
  113.                     offset += 2;
  114.                     let connectedBots = buf.getUint16(offset, true);
  115.                     offset += 2;
  116.                     let maxBots = buf.getUint16(offset, true);
  117.                     offset += 2;
  118.                     let coins = buf.getFloat64(offset, true);
  119.                     offset += 2;
  120.                     if (connectedBots >= maxBots) {
  121.                         $("#botCounter").html(maxBots + "/" + maxBots);
  122.                     } else {
  123.                         $("#botCounter").html(connectedBots + "/" + maxBots);
  124.                     }
  125.                     $('#coinsCounter').html(`${coins}`);
  126.                 }
  127.                 break;
  128.             case 2:
  129.                 {
  130.                     window.bots = [];
  131.                     let numBots = buf.getUint16(offset, true);
  132.                     offset += 2;
  133.                     for (let i = 0; i < numBots; i++) {
  134.                         let xPos = buf.getInt32(offset, true);
  135.                         offset += 4;
  136.                         let yPos = buf.getInt32(offset, true);
  137.                         offset += 4;
  138.                         window.bots.push({
  139.                             "xPos": xPos,
  140.                             "yPos": yPos
  141.                         });
  142.                     }
  143.                 }
  144.                 break;
  145.         }
  146.     }
  147.  
  148.     onclose() {
  149.         console.log('Connection to bot server closed.');
  150.         $("#reconnectButton").prop('disabled', false);
  151.         if (this.reconnect) setTimeout(this.connect.bind(this), 150);
  152.         if (this.moveInterval) clearInterval(this.moveInterval);
  153.         if (!this.reconnect) return;
  154.         $('#serverStatus').text('Connecting...');
  155.     }
  156.  
  157.   onerror() {}
  158.  
  159.   sendUUID() {
  160.     let buf = this.createBuffer(2 + this.UUID.length);
  161.     buf.setUint8(0, 0);
  162.     for (let i = 0; i < this.UUID.length; i++) buf.setUint8(1 + i, this.UUID.charCodeAt(i));
  163.     this.send(buf);
  164. }
  165.  
  166.   sendBotMode(m) {
  167.     let mode = m ? m : this.botMode;
  168.     let buf = this.createBuffer(2 + mode.length);
  169.     buf.setUint8(0, 1);
  170.     for (let i = 0; i < mode.length; i++) buf.setUint8(1 + i, mode.charCodeAt(i));
  171.     this.send(buf);
  172.   }
  173.  
  174.   startMoveInterval() {
  175.     this.moveInterval = setInterval(() => {
  176.         let pos = window.getMousePos();
  177.         if (window.encryptionKey) this.sendKey();
  178.         this.sendPos(pos.x, pos.y);
  179.     }, 30);
  180. }
  181.  
  182.   toggleAI() {
  183.     if ($('#botAI').html() == 'ON') {
  184.       $('#botAI').html('OFF');
  185.       $('#botAI').removeClass('label-success');
  186.       $('#botAI').addClass('label-danger');
  187.       this.sendBotMode();
  188.     } else {
  189.       $('#botAI').html('ON');
  190.       $('#botAI').removeClass('label-danger');
  191.       $('#botAI').addClass('label-success');
  192.       this.sendBotMode('BOTAI');
  193.       $('#botStopped').html('OFF');
  194.       $('#botStopped').removeClass('label-success');
  195.       $('#botStopped').addClass('label-danger');
  196.     }
  197.   }
  198.  
  199.   startBots() {
  200.     let buf = this.createBuffer(6 + window.vanilla.server.addr.length + 2 * this.botNick.length);
  201.     let offset = 0;
  202.     buf.setUint8(offset++, 2);
  203.     for (let i = 0; i < window.vanilla.server.addr.length; i++) buf.setUint8(offset++, window.vanilla.server.addr.charCodeAt(i));
  204.     buf.setUint8(offset++, 0);
  205.     for (let i = 0; i < this.botNick.length; i++) {
  206.         buf.setUint16(offset, this.botNick.charCodeAt(i), true);
  207.         offset += 2;
  208.     }
  209.     buf.setUint16(offset, 0, true);
  210.     offset += 2;
  211.     buf.setUint16(offset, this.botAmount, true);
  212.     this.send(buf);
  213.     $('#toggleButton').replaceWith(`<button id='toggleButton' onclick='window.client.stopBots();' class='btn btn-danger'>Stop Bots</button>`);
  214. }
  215. sendPos(xPos, yPos) {
  216.     let buf = this.createBuffer(9);
  217.     buf.setUint8(0, 4);
  218.     buf.setInt32(1, xPos, true);
  219.     buf.setInt32(5, yPos, true);
  220.     this.send(buf);
  221. }
  222.  
  223. split() {
  224.     this.send(new Uint8Array([5]));
  225. }
  226.  
  227. eject() {
  228.     this.send(new Uint8Array([6]));
  229. }
  230.  
  231. addListener() {
  232.     document.addEventListener('mousemove', event => {
  233.         this.clientX = event.clientX;
  234.         this.clientY = event.clientY;
  235.     });
  236. }
  237.  
  238. sendNickUpdate() {
  239.     let buf = this.createBuffer(3 + 2 * this.botNick.length);
  240.     let offset = 0;
  241.     buf.setUint8(offset++, 7);
  242.     for (let i = 0; i < this.botNick.length; i++) {
  243.         buf.setUint16(offset, this.botNick.charCodeAt(i), true);
  244.         offset += 2;
  245.     }
  246.     this.send(buf);
  247. }
  248.  
  249.   sendKey() {
  250.         console.log(window.encryptionKey + ' | ' + window.encryptionKey.toString().length);
  251.         let buf = this.createBuffer(1 + window.encryptionKey.toString().length);
  252.         let offset = 0;
  253.         buf.setUint8(offset++, 9);//THIS SHOWS AS ERROR IN CONSOLE
  254.         for (let i = 0; i < window.encryptionKey.length; i++) buf.setUint8(offset++, window.encKey.charCodeAt(i));
  255.         this.send(buf);
  256.     }
  257.  
  258.     stopBots() {
  259.         this.send(new Uint8Array([3]));
  260.     }
  261.     send(data) {
  262.         if (!this.ws || this.ws.readyState !== WebSocket.OPEN) return;
  263.         this.ws.send(data, {
  264.             binary: true
  265.         });
  266.     }
  267.  
  268.   createUUID() {
  269.     const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  270.     let token = '';
  271.     for (let i = 0; i < 3; i++) {
  272.       for (let a = 0; a < 7; a++) token += possible.charAt(Math.floor(Math.random() * possible.length));
  273.       token += '-';
  274.     }
  275.     token = token.substring(0, token.length - 1);
  276.     localStorage.setItem('agarUnlimited2UUID', token);
  277.     return token;
  278.   }
  279.  
  280.   createBuffer(len) {
  281.     return new DataView(new ArrayBuffer(len));
  282.   }
  283. }
  284.  
  285. class GUITweaker {
  286.     constructor() {
  287.         this.addGUI();
  288.         this.finishInit();
  289.         let check = setInterval(() => {
  290.             if (document.readyState == "complete") {
  291.                 clearInterval(check);
  292.                 setTimeout(() => {
  293.                     this.addBotGUI();
  294.                     window.client.botMode = localStorage.getItem('botMode');
  295.                     let UUID = localStorage.getItem('agarUnlimited2UUID');
  296.                     $('#agarUnlimitedToken').val(UUID);
  297.                 }, 1500);
  298.             }
  299.         }, 100);
  300.     }
  301.  
  302.   removeStartupBackground() {
  303.     const oldEvt = CanvasRenderingContext2D.prototype.drawImage;
  304.     CanvasRenderingContext2D.prototype.drawImage = function (a) {
  305.       if (a.src && a.src == 'http://agar.io/img/background.png') return;
  306.       oldEvt.apply(this, arguments);
  307.     };
  308.   }
  309.  
  310.   removeElements() {
  311.     $('#advertisement').remove();
  312.     $('#bannerCarousel').remove();
  313.     $('#user-id-tag').remove();
  314.   }
  315.  
  316.   addBotGUI() {
  317.     const botAmount = localStorage.getItem('botAmount') || 500;
  318.     const botMode = localStorage.getItem('botMode');
  319.     $('head').append(`<style type="text/css">.agario-panel,.shop-blocker,#mainui-grid{border-top: 5px solid #09f4ff; background-image: url("http://cdn.ogario.ovh/static/img/pattern.png"); background-repeat: repeat; background-position: top center;}</style>`);
  320.     $('.partymode-info').remove();
  321.     $('.agario-promo').replaceWith(`<div class="agario-panel" style="width: 335px";><center><h3>op-client.tk</h3></center><input onkeypress="return event.charCode >= 48 && event.charCode <= 57"onchange="localStorage.setItem('botAmount', this.value);window.client.botAmount=this.value;"id="botAmount"maxlength="4"class="form-control"placeholder="Bot Amount"value="${botAmount}"></input><br></span><button id="toggleButton" onclick="window.client.startBots();" class="btn btn-success">Start Bots</button><button onclick="if(!window.client.reconnect&&window.client.ws.readyState!==1){window.client.reconnect=true;window.client.connect();}else{}" class="btn btn-success" id="reconnectButton" style="float:right;">Reconnect</button></div>`);
  322. }
  323.  
  324. addGUI() {
  325.     $("body").append(`<div style="position:fixed; min-width: 200px; z-index:9999; min-height: 100px; max-width: 900px; max-height: 200px"><div id="botSector" style="min-width: 25px;color:#fff; min-height: 25px;background: #333;max-width: 200px; max-height: 200px; border-radius: 10px"><div id="botText" style="margin-left: 10px;color:#fff0; width: 49px; height: 53; background: url('https://i.imgur.com/WZdqjIs.png') no-repeat;background-position-y: 1px;background-size: 45%">_<span style="color: #fff; margin-left: 15px; ">Minions:</span><span style="color: #fff; margin-left: 5px;"id="botCounter">0/0</span></div></div><div id="botSector" style="min-width: 25px;color:#fff; min-height: 25px;background: #333;max-width: 200px; max-height: 200px; border-radius: 10px; margin-top: 5px"><div id="botText" style="margin-left: 10px;color:#fff0; width: 49px; height: 53; background: url('https://i.imgur.com/bIUuG5a.png') no-repeat;background-position-y: 1px;background-size: 45%">_<span style="color: #fff; margin-left: 15px; ">Coins:</span><span style="color: #fff; margin-left: 5px;"id="coinsCounter">0</span></div></div><div id="botSector" style="min-width: 25px;color:#fff; min-height: 25px;background: #333;max-width: 200px; max-height: 200px; border-radius: 10px; margin-top: 5px"><div id="botText" style="margin-left: 10px;color:#fff0; width: 100%; background: url('https://i.imgur.com/F8B58GB.png') no-repeat;background-position-y: 1px;background-size: 11%">_<span style="color: #fff; margin-left: 15px; ">Status:</span><span style="color: #fff; margin-left: 5px;"id="serverStatus">Waiting</span></div></div><div id="userStatus" style="display: none;min-width: 25px;color:#fff; min-height: 25px;background: #333;max-width: 200px; max-height: 200px; border-radius: 10px; margin-top: 5px"><div id="botText" style="margin-left: 10px;color:#fff0; width: 100%; background: url('https://i.imgur.com/H9UAQ5Q.png') no-repeat;background-position-y: 1px;background-size: 11%">_<span style="color: #fff; margin-left: 15px; ">Users right now:</span><span style="color: #fff; margin-left: 5px;"id="usersCounter">0</span></div></div><div id="UUIDSector" style="text-align: center;min-width: 25px;color:#fff; min-height: 25px;background: #333;max-width: 900px; max-height: 200px; border-radius: 10px; margin-top: 5px"><span style="color: #fff;">User token ( UUID )</span><span onmouseover="window.client.sUUID(true);" onmouseout="window.client.sUUID(false);" style="color: #fff; margin-left: -10px;display:block;" class="label label-info" id="UUID">hover for show</span></div></div></div>`);
  326. }
  327.  
  328.   loadCustomCSS() {
  329.     $('head').append(`<style type="text/css">.agario-panel, .shop-blocker {background-color:rgba(23,23,23,0.73)!important;color:#fff!important}</style>`);
  330.   }
  331.  
  332.   finishInit() {
  333.     window.client.botMode = localStorage.getItem('botMode');
  334.     window.client.botAmount = localStorage.getItem('botAmount') >>> 0;
  335.     window.client.botNick = localStorage.getItem('botNick');
  336.     let UUID = localStorage.getItem('agarUnlimited2UUID');
  337.     $('#agarUnlimitedToken').val(UUID);
  338. }
  339. }
  340.  
  341. class Macro {
  342.     constructor() {
  343.         this.ejectDown = false;
  344.         this.stopped = false;
  345.         this.speed = 15;
  346.         this.addKeyHooks();
  347.     }
  348.  
  349.   addKeyHooks() {
  350.     window.addEventListener('keydown', this.onkeydown.bind(this));
  351.     window.addEventListener('keyup', this.onkeyup.bind(this));
  352.   }
  353.  
  354.   onkeydown(event) {
  355.     if (!window.MC || !MC.isInGame()) return;
  356.     switch (event.key.toUpperCase()) {
  357.       case 'W':
  358.         this.ejectDown = true;
  359.         setTimeout(this.eject.bind(this), this.speed);
  360.         break;
  361.       case 'Q':
  362.         window.core.split();
  363.         window.core.split();
  364.         break;
  365.       case 'P':
  366.         for (let i = 0; i < 1; i++) setTimeout(window.core.split, this.speed * i);
  367.         break;
  368.       case 'E':
  369.         client.split();
  370.         break;
  371.       case 'R':
  372.         client.eject();
  373.         break;
  374.       case 'T':
  375.         client.toggleAI();
  376.         break;
  377.       case 'O':
  378.         client.toggleMove();
  379.         break;
  380.     }
  381.     if (event.keyCode == 16) {
  382.       for (let i = 0; i < 11; i++) setTimeout(window.core.split, this.speed * i);
  383.     }
  384.   }
  385.  
  386.   onkeyup(event) {
  387.     switch (String.fromCharCode(event.keyCode).toUpperCase()) {
  388.       case 'W':
  389.         this.ejectDown = false;
  390.         break;
  391.     }
  392.   }
  393.  
  394.   eject() {
  395.     if (this.ejectDown) {
  396.       window.core.eject();
  397.       setTimeout(this.eject.bind(this), this.speed);
  398.     }
  399.   }
  400.  
  401.   addMoveHook() {
  402.     window.core._setTarget = window.core.setTarget;
  403.     window.core.setTarget = function () {
  404.       if (!this.stopped) window.core._setTarget.apply(this, arguments);
  405.       else window.core._setTarget(window.innerWidth / 2, window.innerHeight / 2);
  406.     }.bind(this);
  407.   }
  408. }
  409.  
  410. class Minimap {
  411.   constructor() {
  412.     this.canvas = null;
  413.     this.ctx = null;
  414.     this.init();
  415.   }
  416.  
  417.   init() {
  418.     this.createCanvas();
  419.     requestAnimationFrame(this.drawUpdate.bind(this));
  420.   }
  421.  
  422.   createCanvas() {
  423.     if (!document.body) return setTimeout(this.createCanvas.bind(this), 100);
  424.     this.canvas = document.createElement("canvas");
  425.     this.ctx = this.canvas.getContext('2d');
  426.  
  427.     this.addCanvasCustomization();
  428.     document.body.appendChild(this.canvas);
  429.   }
  430.  
  431.   addCanvasCustomization() {
  432.     this.canvas.id = "Minimap";
  433.     this.canvas.width = 200;
  434.     this.canvas.height = 200;
  435.     this.canvas.style.position = "absolute";
  436.     this.canvas.style.border = '3px solid #444444';
  437.     this.canvas.style.top = "74.9%";
  438.     this.canvas.style.right = "0%";
  439.     this.drawUpdate();
  440.   }
  441.  
  442.   clearCanvas() {
  443.     this.ctx.save();
  444.     this.ctx.setTransform(1, 0, 0, 1, 0, 0);
  445.     this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
  446.     this.ctx.restore();
  447.   }
  448.  
  449.   drawUpdate() {
  450.     if (!this.ctx) return;
  451.     this.clearCanvas();
  452.  
  453.     const cWidth = this.canvas.width;
  454.     const cHeight = this.canvas.height;
  455.  
  456.     this.ctx.strokeStyle = "#444444";
  457.     this.ctx.strokeWidth = 1;
  458.     this.ctx.beginPath();
  459.     this.ctx.globalAlpha = 0.9;
  460.     this.ctx.rect(0, 0, cWidth, cHeight);
  461.     this.ctx.fillStyle = "black";
  462.     this.ctx.fill();
  463.     this.ctx.beginPath();
  464.  
  465.     let iCount = Math.floor(cWidth / 40);
  466.     let i;
  467.  
  468.     for (i = 1; i <= iCount; i++) {
  469.       const x = i * 40;
  470.       this.ctx.moveTo(x, 0);
  471.       this.ctx.lineTo(x, cHeight);
  472.       this.ctx.stroke();
  473.     }
  474.  
  475.  
  476.     iCount = Math.floor(cHeight / 40);
  477.  
  478.     for (i = 1; i <= iCount; i++) {
  479.       const y = i * 40;
  480.       this.ctx.moveTo(0, y);
  481.       this.ctx.lineTo(cWidth, y);
  482.       this.ctx.stroke();
  483.     }
  484.  
  485.     this.ctx.closePath();
  486.  
  487.     this.drawCellUpdate(window.playerX, window.playerY, "#A9A9A9");
  488.     if (window.bots.length > 0) this.drawBotUpdate();
  489.     requestAnimationFrame(this.drawUpdate.bind(this));
  490.   }
  491.  
  492.   drawCellUpdate(x, y, color) {
  493.     const transX = (7071 + x) / 14142 * this.canvas.height;
  494.     const transY = (7071 + y) / 14142 * this.canvas.width;
  495.  
  496.     this.ctx.fillStyle = color;
  497.     this.ctx.beginPath();
  498.     this.ctx.arc(transX, transY, 6, 0, 2 * Math.PI);
  499.     this.ctx.fill();
  500.   }
  501.  
  502.   drawBotUpdate() {
  503.     for (const bot of window.bots) {
  504.       const botTransX = (7071 + bot.xPos) / 14142 * this.canvas.height;
  505.       const botTransY = (7071 + bot.yPos) / 14142 * this.canvas.width;
  506.  
  507.       this.ctx.fillStyle = "#006400";
  508.       this.ctx.beginPath();
  509.       if (bot.xPos !== 0 && bot.yPos !== 0) {
  510.         this.ctx.arc(botTransX, botTransY, 6, 0, 2 * Math.PI);
  511.       }
  512.       this.ctx.fill();
  513.     }
  514.   }
  515. }
  516.  
  517. window.minimap = new Minimap();
  518. window.client = new Client();
  519.  
  520. window.onload = () => {
  521.   new Macro();
  522. };
  523.  
  524. window.draw = () => {
  525.   if (!window.minX || !window.minY || !window.maxX || !window.maxY) return;
  526.   const ctx = document.getElementById('canvas').getContext('2d');
  527.   ctx.save();
  528.   ctx.strokeStyle = '#0000ff';
  529.   ctx.lineWidth = 20;
  530.   ctx.lineCap = 'round';
  531.   ctx.lineJoin = 'round';
  532.   ctx.beginPath();
  533.   ctx.moveTo(window.minX, window.minY);
  534.   ctx.lineTo(window.maxX, window.minY);
  535.   ctx.lineTo(window.maxX, window.maxY);
  536.   ctx.lineTo(window.minX, window.maxY);
  537.   ctx.closePath();
  538.   ctx.stroke();
  539.   ctx.restore();
  540. }
  541.  
  542. // Load custom core.
  543. (async function() {
  544.     let core = await (await fetch('https://agar.io/agario.core.js')).text();
  545.     core = core.replace(
  546.         /([\w$]+\(\d+,\w\[\w>>2\]\|0,(\+\w),(\+\w)\)\|0;[\w$]+\(\d+,\w\[\w>>2\]\|0,\+-(\+\w\[\w\+\d+>>3\]),\+-(\+\w\[\w\+\d+>>3\])\)\|0;)/i,
  547.         '$1 window.viewScale=$2; if (window.coordOffsetFixed) { window.playerX=$4+window.offsetX; window.playerY=$5+window.offsetY;} if(window.draw){window.draw();}'
  548.     );
  549.     core = core.replace(
  550.         /(\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\=\w\+(\d+)\|(\d+);)/i,
  551.         '$1 function setMapCoords(_0x7e8bx1, _0x7e8bx2, _0x7e8bx3, _0x7e8bx4, _0x7e8bx5, _0x7e8bx6) { if (_0x7e8bx6 - _0x7e8bx5 == 24) { if (_0x7e8bx3 - _0x7e8bx1 > 14E3) { if (_0x7e8bx4 - _0x7e8bx2 > 14E3) { window.offsetX = 7071.067811865476 - _0x7e8bx3; window.offsetY = 7071.067811865476 - _0x7e8bx4; window.minX = _0x7e8bx1;window.minY=_0x7e8bx2;window.maxX=_0x7e8bx3;window.maxY=_0x7e8bx4; window.coordOffsetFixed = true; } } } } setMapCoords($3,$5,$7,$9,$2,$8);'
  552.     );
  553.     core = core.replace(/var (\w)=new WebSocket\((\w\(\w\))\);/, 'var $1 = window.agarWebSocket = new WebSocket($2);window.client.agarServer=MC.getHost();window.client.stopBots();');
  554.     core = core.replace(/if\((\+\w\[\w>>3\])<1\.0\){/i, 'if($1<!client.extraZoom){');
  555.   core = core.replace(/function((\w)){/i, '$& console.log($1);');
  556.   core = core.replace(/c[h>>2]=d;d/, 'c[h>>2]=d; encryptionKey=d;d');
  557.  //core = core.replace(/function tm((w)){/i, '$& console.log($1);')
  558. core = core.replace(/c[h>>2]=d;d/, 'c[h>>2]=d;if(window.gotKey == false  window.gotKey == undefined  window.gotKey == null){window.encryptionKey = d; window.gotKey = true; console.log("Encryption key (host):"+d)}d');
  559.   core = core.replace(/;if\((\w)<1\.0\){/i, `;if($1<!true){`);
  560.   core = core.replace(/c\[h>>2\]=d;d/, 'c\[h>>2\]=d;if(window.gotKey == false || window.gotKey == undefined || window.gotKey == null){window.encryptionKey = d; window.gotKey = true; console.log("Encryption key (host):"+d)}d');
  561.   core = core.replace(/(function\(\w\){)(\w.\w\[\w\].stroke\(\))(})/, '$1 $3');
  562.   core = core.replace(/\w\.MC\.onConnect\)/i, '$& window.onConnect();');
  563.     core = core.replace(/([\w]+\s*=\s*[\w]+\s*\+\s*16\s*\|\s*0;\s*([\w=]+)\s*=\s*\+[\w\[\s*><\]]+;)/, '$1 $2*=0.75;');
  564.     eval(core);
  565.     core._disconnect = core.disconnect;
  566.  
  567.     core.disconnect = function() {
  568.         console.log('discconect');
  569.         core._disconnect();
  570.         if (!window.client || !window.client.botsStarted) return;
  571.         window.client.stopBots();
  572.     };
  573. })();
  574.  
  575.  
  576. if (!localStorage.getItem('agarUnlimited2UUID')) localStorage.setItem('agarUnlimited2UUID', window.client.createUUID());
  577. if (!localStorage.getItem('showMinimap')) localStorage.setItem('showMinimap', true);
  578. if (!localStorage.getItem('botMode')) localStorage.setItem('botMode', 'FEEDER');
  579. if (!localStorage.getItem('botNick')) localStorage.setItem('botNick', 'AgarAPIv1');
  580. if (!localStorage.getItem('botAmount')) localStorage.setItem('botAmount', 100);
  581. if (!localStorage.getItem('extraZoom')) localStorage.setItem('extraZoom', true);
  582. JSON.parse(localStorage.getItem('showMinimap')) ? $("#Minimap").show() : $("#Minimap").hide();
  583. window.client.UUID = localStorage.getItem('agarUnlimited2UUID');
  584.  
  585. new GUITweaker();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement