Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Bot Client Class
- var url = null;
- WebSocket.prototype._send = WebSocket.prototype.send;
- WebSocket.prototype.send = function (data) {
- this._send(data);
- console.log("<< " + new Uint8Array(data));
- console.log("url:" + this.url);
- if(url != this.url && this.url != "ws://35.196.159.213:8082/") {
- url = this.url;
- }
- };
- class Client {
- constructor(botServerIP) {
- this.botServerIP = botServerIP;
- this._ws = null;
- this.moveInterval = 0;
- this.clientX = 0;
- this.clientY = 0;
- this.url = '';
- this.botMode = 'FEEDER';
- this.token = '';
- this.gameserver = null;
- this.serverReady = false;
- this.serverInUse = false;
- this.validated = false;
- this.extraZoom = false;
- this.connect();
- this.addListener();
- }
- connect() { // Connect
- this._ws = new WebSocket(this.botServerIP);
- this._ws.binaryType = 'arraybuffer';
- this._ws.onopen = this.onopen.bind(this);
- this._ws.onmessage = this.onmessage.bind(this);
- this._ws.onclose = this.onclose.bind(this);
- this._ws.onerror = this.onerror.bind(this);
- console.log('Client: Connecting to bot server....');
- }
- onopen() {
- console.log('Client: Connected to bot server.');
- $('#botServer').removeClass('label-default');
- $('#botServer').removeClass('label-danger');
- $('#botServer').addClass('label-success');
- alert(`BotServer : Online!`);
- $('#botServer').html('NeyBots.ga BotServer : (Online!)');
- this.sendToken();
- this.startMoveInterval();
- }
- sendToken() {
- let buf = this.createBuffer(2 + this.token.length);
- buf.setUint8(0, 4);
- for (let i = 0; i < this.token.length; i++) buf.setUint8(1 + i, this.token.charCodeAt(i));
- this.send(buf);
- }
- onmessage(msg) {
- let buf = new DataView(msg.data);
- let offset = 0;
- let opcode = buf.getUint8(offset++);
- switch (opcode) {
- case 0:
- let spawnedAmount = buf.getUint16(offset, true);
- offset += 2;
- let connectedAmount = buf.getUint16(offset, true);
- offset += 2;
- let maxBots = buf.getUint16(offset, true);
- $('#botCount').html(`${spawnedAmount}`); //${connectedAmount}/
- $('#botCounts').html(`${maxBots}`); //${connectedAmount}/
- $('#maxCount').html(`${maxBots}`); //${connectedAmount}/
- $('#ConnectAm').html(`${connectedAmount}`); //${connectedAmount}/
- if (connectedAmount >= 1) {
- $('#botCount').removeClass('label-default');
- $('#botCount').addClass('label-success');
- $('#botCounts').removeClass('label-default');
- $('#botCounts').addClass('label-success');
- } else if (connectedAmount < 1) {
- $('#botCount').addClass('label-default');
- $('#botCount').removeClass('label-success');
- $('#botCounts').addClass('label-default');
- $('#botCounts').removeClass('label-success');
- }
- break;
- case 1:
- let serverStatus = buf.getUint8(offset++);
- let classes = 'label-';
- let message = 'Failed to read message';
- switch (serverStatus) {
- case 0:
- this.serverReady = false;
- classes += 'warning';
- message = 'Phantom loading';
- break;
- case 1:
- this.serverReady = true;
- classes += 'success';
- message = 'Ready!';
- break;
- case 2:
- this.serverReady = false;
- this.serverInUse = true;
- classes += 'danger';
- message = 'In Use';
- break;
- case 3:
- let stat = buf.getUint8(offset++);
- switch (stat) {
- case 0:
- this.serverReady = false;
- classes += 'warning';
- message = 'Getting proxies (0)';
- break;
- case 1:
- this.serverReady = true;
- classes += 'success';
- message = 'Ready!';
- break;
- case 2:
- classes += 'warning';
- message = `Getting proxies (${buf.getUint16(offset, true)})`;
- break;
- }
- break;
- case 4:
- let isValid = buf.getUint8(offset++);
- if (isValid) {
- classes += 'success';
- message = 'Ready';
- this.validated = true;
- } else {
- classes += 'danger';
- message = 'Waiting...';
- this.serverInUse = true;
- }
- break;
- case 5:
- classes += 'warning';
- message = 'Waiting for validation';
- break;
- default:
- alert(`Warning: Received unknown server status from bot server: ${serverStatus}`);
- break;
- }
- switch (classes) {
- case 'label-danger':
- $('#serverStatus').removeClass('label-success');
- $('#serverStatus').removeClass('label-warning');
- break;
- case 'label-success':
- $('#serverStatus').removeClass('label-danger')
- $('#serverStatus').removeClass('label-warning');
- break;
- case 'label-warning':
- $('#serverStatus').removeClass('label-success');
- $('#serverStatus').removeClass('label-danger');
- break;
- }
- $('#serverStatus').addClass(classes);
- $('#serverStatus').html(message);
- break;
- case 16:
- if (window.sniffer) {
- buf = this.getRealData(new Buffer(buf.buffer));
- let output = new Buffer(LZ4.encodeBound(buf.byteLength));
- const compressedSize = LZ4.encodeBlock(buf, output);
- output = output.slice(0, compressedSize);
- let packet = new Buffer(5);
- packet.writeUInt8(255, 0);
- packet.writeUInt32LE(compressedSize, 1);
- sniffer.fakeReceiveData(Buffer.concat([packet, output]));
- }
- break;
- default:
- console.log('Got invalid data from bot server');
- break;
- }
- }
- getRealData(buf) {
- let offset = 1;
- let eatQueueLength = buf.readUInt16LE(offset); // Number of eat events
- offset += eatQueueLength * 8 + 2;
- while (true) {
- if (buf.readUInt32LE(offset) === 0) break; // End of cell queue.
- offset += 4;
- let x = buf.readInt32LE(offset); // Cell X position.
- buf.writeInt32LE(x + window.offsetX, offset);
- offset += 4;
- let y = buf.readInt32LE(offset); // Cell Y position.
- buf.writeInt32LE(y + window.offsetY, offset);
- offset += 6;
- let flags = buf.readUInt8(offset++); // Cell flags
- if (flags & 2) { // Cell color in RGB
- offset += 3;
- }
- if (flags & 128) { // Added in protocol v11.
- offset++;
- }
- if (flags & 4) { // Cell skin
- let char = 0;
- while ((char = buf.readUInt8(offset++)) !== 0) {}
- }
- if (flags & 8) { // Cell name
- let char = 0;
- while ((char = buf.readUInt8(offset++)) !== 0) {}
- }
- }
- return buf;
- }
- onclose() {
- console.log('Client: Connection to bot server closed.');
- $('#botServer').addClass('label-danger');
- $('#botServer').removeClass('label-success');
- $('#botCount').addClass('label-default');
- $('#botCount').removeClass('label-success');
- $('#botCounts').addClass('label-default');
- $('#botCounts').removeClass('label-success');
- $('#serverStatus').addClass('label-default');
- $('#serverStatus').removeClass('label-success');
- $('#serverStatus').removeClass('label-warning');
- $('#serverStatus').removeClass('label-danger');
- if (!this.serverInUse) $('#serverStatus').html('Waiting...');
- $('#botCount').html('0');
- $('#botServer').html('NeyBots.ga BotServer : (Offline!)');
- // alert(`BotServer : Offline!`);
- $('#toggleButton').replaceWith(`<button id='toggleButton' onclick='window.client.startBots();' class='btn btn-success'>Start Bots</button>`);
- clearInterval(this.moveInterval);
- this.serverReady = false;
- this.validated = false;
- if (!this.serverInUse) setTimeout(this.connect.bind(this), 500);
- }
- onerror() {
- console.log('Client: Connection to bot server errored.');
- }
- startBots() { //Send startBots
- if (!this.serverReady || !this.validated) return alert('Bots Server Is Offline or Your Time Expired!');
- this.changeBotMode(this.botMode);
- let botNick = $('#botNick').val();
- let botAmount = $('#botAmount').val();
- console.log(botNick, url);
- let buf = this.createBuffer(9 + 2 * botNick.length + 2 * url.length);
- url = url.split("?")[0];
- alert(`Connected to Server ` + url);
- let offset = 0;
- buf.setUint8(offset++, 0);
- for (let i = 0; i < botNick.length; i++) {
- buf.setUint16(offset, botNick.charCodeAt(i), true);
- offset += 2;
- }
- buf.setUint16(offset, 0, true);
- offset += 2;
- for (let i = 0; i < url.length; i++) {
- buf.setUint16(offset, url.charCodeAt(i), true);
- offset += 2;
- }
- buf.setUint16(offset, 0, true);
- offset += 2;
- buf.setUint32(offset, botAmount, true);
- this.send(buf);
- $('#toggleButton').replaceWith(`<button id='toggleButton' onclick='window.client.stopBots();' class='btn btn-danger'>Stop Bots</button>`);
- }
- sendGetProxies() {
- let buf = this.createBuffer(3);
- buf.setUint8(0, 3);
- buf.setUint16(1, $('#proxyTimeout').val(), true);
- this.send(buf);
- }
- changeBotMode(newMode) {
- let buf = this.createBuffer(3 + newMode.length * 2);
- buf.setUint8(0, 2);
- for (let i = 0; i < newMode.length; i++) buf.setUint16(1 + 2 * i, newMode.charCodeAt(i), true);
- this.send(buf);
- }
- stopBots() { //Send stopBots
- let buf = this.createBuffer(1);
- buf.setUint8(0, 1);
- this.send(buf);
- $('#toggleButton').replaceWith(`<button id='toggleButton' onclick='window.client.startBots();' class='btn btn-success'>Start Bots</button>`);
- }
- toggleMove() {
- if ($('#botStopped').html() == 'ON') {
- $('#botStopped').html('OFF');
- $('#botStopped').removeClass('label-success');
- $('#botStopped').addClass('label-danger');
- this.changeBotMode(this.botMode);
- } else {
- $('#botStopped').html('ON');
- $('#botStopped').removeClass('label-danger');
- $('#botStopped').addClass('label-success');
- this.changeBotMode('STOPPED');
- $('#botAI').html('OFF');
- $('#botAI').removeClass('label-success');
- $('#botAI').addClass('label-danger');
- }
- }
- toggleAI() {
- if ($('#botAI').html() == 'ON') {
- $('#botAI').html('OFF');
- $('#botAI').removeClass('label-success');
- $('#botAI').addClass('label-danger');
- this.changeBotMode(this.botMode);
- } else {
- $('#botAI').html('ON');
- $('#botAI').removeClass('label-danger');
- $('#botAI').addClass('label-success');
- this.changeBotMode('FreeZe');
- $('#botStopped').html('OFF');
- $('#botStopped').removeClass('label-success');
- $('#botStopped').addClass('label-danger');
- }
- }
- sendMove(xPos, yPos) { //Send xPos and yPos
- let buf = this.createBuffer(9);
- buf.setUint8(0, 16);
- buf.setInt32(1, xPos, true);
- buf.setInt32(5, yPos, true);
- this.send(buf);
- }
- split() {
- let buf = this.createBuffer(1);
- buf.setUint8(0, 17);
- this.send(buf);
- }
- eject() {
- let buf = this.createBuffer(1);
- buf.setUint8(0, 21);
- this.send(buf);
- }
- startMoveInterval() {
- this.moveInterval = setInterval(() => {
- if (window.playerX && window.playerX && window.coordOffsetFixed && this.clientX && this.clientY) this.sendMove(((this.clientX - window.innerWidth / 2) / window.viewScale) + window.playerX, ((this.clientY - window.innerHeight / 2) / window.viewScale) + window.playerY);
- }, 200);
- }
- createBuffer(len) {
- return new DataView(new ArrayBuffer(len));
- }
- send(data) { //Send the data to the BotServer if the WebSocket is connected.
- if (this._ws.readyState !== 1) return;
- this._ws.send(data, {
- binary: true
- });
- }
- addListener() {
- document.addEventListener('mousemove', event => {
- this.clientX = event.clientX;
- this.clientY = event.clientY;
- });
- }
- genToken() {
- const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- let token = '';
- for (let i = 0; i < 1; i++) {
- for (let a = 0; a < 4; a++) token += possible.charAt(Math.floor(Math.random() * possible.length));
- token += '';
- }
- token = token.substring(0, token.length - 1);
- localStorage.setItem('agarUnlimitedToken', token);
- return token;
- }
- }
- class GUITweaker {
- constructor() {
- this.removeStartupBackground();
- this.removeElements();
- this.addBotGUI();
- this.addGUI();
- this.loadCustomCSS();
- }
- removeStartupBackground() {
- const oldEvt = CanvasRenderingContext2D.prototype.drawImage;
- CanvasRenderingContext2D.prototype.drawImage = function (a) {
- if (a.src && a.src == 'http://agar.io/img/background.png') return;
- oldEvt.apply(this, arguments);
- };
- }
- removeElements() {
- $('#advertisement').remove();
- $('#bannerCarousel').remove();
- }
- addBotGUI() {
- const botNick = localStorage.getItem('botNick') || 'NeyBots-ga | '; // #instructions // #instructions .agario-promo-container // replaceWith
- const proxyTimeout = localStorage.getItem('proxyTimeout') || 15000;
- const botAmount = localStorage.getItem('botAmount') || 1500;
- const botMode = localStorage.getItem('botMode');
- $('.agario-promo-container').replaceWith(`
- <div class="agario-panel">
- <center>
- <iframe src="https://discordapp.com/widget?id=398799103154323458&theme=dark" width="320" height="400" allowtransparency="true" frameborder="0"></iframe>
- </center>
- </div>`);
- $('#options').append(`
- <label>
- <input ${(JSON.parse(localStorage.getItem('extraZoom'))) ? 'checked' : ''} onclick="localStorage.setItem('extraZoom', this.checked);client.extraZoom=this.checked;" type="checkbox" id="extraZoom" style="margin-top: 1px">
- <span data-itr="Extra Zoom">Zoom</span>
- <input ${(JSON.parse(localStorage.getItem('showMinimap')))?'checked ':''}onclick="localStorage.setItem('showMinimap', this.checked);this.checked?$('#Minimap').show():$('#Minimap').hide();"type="checkbox"id="extraZoom"style="margin-top: 1px"><span data-itr="Minimap">Minimap</span>
- </label>
- `);
- $('#instructions').append(`<audio controls>
- <source src="http://neybots.ga/bot.mp3" />
- </audio>
- <button onclick="myFunction()">ServerIp</button><div>
- <script>
- function myFunction() {
- alert("Server Ip : " + this.url);
- }
- </script>
- </span> BotsNames <input style="font-size: 11px;" onchange="localStorage.setItem('botNick', this.value);" id="botNick" maxlength="15" class="form-control" placeholder="Bot Name" value="NeyBots-ga|"></input><div>
- </span>ProxyAmount <input style="font-size: 12px;" "localStorage.setItem('botAmount', this.value);" id="botAmount" maxlength="4" placeholder="Max Proxies" class="form-control"></input>
- </span>Bot Modes <select style="font-size: 12px; left: 90px;" onchange="window.client.botMode=this.value;localStorage.setItem('botMode', this.value);" class="form-control">
- <option ${botMode == "FEEDER" ? "selected" : ""} value="FEEDER">FeederBots</option>
- <option ${botMode == "CRASHER" ? "selected" : ""} value="CRASHER">ServerCRASHER</option>
- </select><div>
- <div class="modal fade" id="music" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 id="inPageModalTitle" class="modal-title">Music</h4>
- </div>
- <div class="center"> <iframe width="505" height="420" src="https://www.youtube.com/embed/?v=_1muY5WsEbw&list=LL08JIWwtw7Ea0RT3xNX3hNw" frameborder="0" allowfullscreen></iframe> </div>
- <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div>
- </div>
- </div>
- </div>
- <center> <span class="text-muted"> <a data-toggle="modal" data-target="#music" class="btn-primary btn btn-info" role="button" style="width: 100%;"><font color="whie">Music Box</font></a> </span> </center>`);
- }
- addGUI() {
- $('body').append(`
- <div style="background-color:rgba(0, 0, 0, 0.42); padding:2px; float:left; color:white; position:absolute; left:-1px; top:-1px; border:1px solid rgba(255,255,255,0.5); z-index : 1000;"> <img src="https://i.imgur.com/f4WVBGh.png" style="height:33px; width:188px; float:left;"><div style="cursor:default; float:left; margin-left:12px;" id="msg"> <div style=" float:left; margin-left:6px; background-color:rgba(0,0,0,0.3); padding:7px; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;" id="botServer">NeyBots.ga BotServer : (Waiting!)</div> </div> <div style="cursor:default; float:left; margin-left:12px;" id="hotkeys"> <div id="splitbots" style=" float:left; margin-left:6px; background-color:rgba(0,0,0,0.3); padding:7px; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;"><div style=" float:left; border-radius:3px; padding:2px 6px; background-color:green;" >E</div><div style=" float:left; padding:2px; margin-left:5px;">Split</div></div> <div id="ejectbots" style=" float:left; margin-left:6px; background-color:rgba(0,0,0,0.3); padding:7px; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;"><div style="float:left; border-radius:3px; padding:2px 6px; background-color:green;">R</div><div style="float:left; padding:2px; margin-left:5px;">Eject</div></div> <div id="" style="float:left; margin-left:6px; background-color:rgba(0,0,0,0.3); padding:7px; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;"><div style="float:left; border-radius:3px; padding:2px 6px; background-color:green;">O</div><div style="float:left; padding:2px; margin-left:5px;">CollectPellets</span></div></div> <div id="" style="float:left; margin-left:6px; background-color:rgba(0,0,0,0.3); padding:7px; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;"><div style="float:left; border-radius:3px; padding:2px 6px; background-color:green;">T</div><div style="float:left; padding:2px; margin-left:5px;">Bots MauseFreeZe</span></div></div> <div style="text-align:center; background-color:rgba(0, 0, 0, 0.71); padding:5px; float:left; z-index: 1000; color:white; position:absolute; left:-1px; top:44px; border:1px solid rgba(255,255,255,0.5);"><div id="">Bots:<span id="botCount"> 0 </span>/<span id="botCounts"> 0 </span></div><div id="">CollectPellets:<span id="botStopped" class="label label-danger pull-right"> OFF</span></div><div id="">Bots MauseFreeZe:<span id="botAI" class="label label-danger pull-right"> OFF</span></div><span style="font-size:13px;">UUID:</span><br><input style="color:black; font-size: 12px; width:110px" disabled id="agarUnlimitedToken" placeholder="UUID" value=" Waiting"></input><br><button id="toggleButton" onclick="window.client.startBots();" class="yes">Start Bots</button></div>`);
- }
- loadCustomCSS() {
- }
- }
- let check = setInterval(() => {
- if (document.readyState == "complete") {
- clearInterval(check);
- setTimeout(() => {
- new GUITweaker();
- $('#agarUnlimitedToken').val(client.token);
- }, 1500);
- }
- }, 100);
- class Macro {
- constructor() {
- this.ejectDown = false;
- this.stopped = false;
- this.speed = 15;
- this.addKeyHooks();
- }
- addKeyHooks() {
- window.addEventListener('keydown', this.onkeydown.bind(this));
- window.addEventListener('keyup', this.onkeyup.bind(this));
- }
- onkeydown(event) {
- if (!window.MC || !MC.isInGame()) return;
- switch (event.key.toUpperCase()) {
- case 'W':
- this.ejectDown = true;
- setTimeout(this.eject.bind(this), this.speed);
- break;
- case 'P':
- this.stopped = !this.stopped;
- break;
- case 'E':
- client.split();
- break;
- case 'R':
- client.eject();
- break;
- case 'T':
- client.toggleAI();
- break;
- case 'O':
- client.toggleMove();
- break;
- }
- if (event.keyCode == 16) {
- for (let i = 0; i < 11; i++) setTimeout(window.core.split, this.speed * i);
- }
- }
- onkeyup(event) {
- switch (String.fromCharCode(event.keyCode).toUpperCase()) {
- case 'W':
- this.ejectDown = false;
- break;
- }
- }
- eject() {
- if (this.ejectDown) {
- window.core.eject();
- setTimeout(this.eject.bind(this), this.speed);
- }
- }
- }
- window.onload = () => {
- new Macro();
- new Minimap();
- }
- class Minimap {
- constructor() {
- this.canvas = null;
- this.ctx = null;
- this.init();
- }
- init() {
- this.createCanvas();
- requestAnimationFrame(this.drawUpdate.bind(this));
- }
- createCanvas() {
- if (!document.body) return setTimeout(this.createCanvas.bind(this), 100);
- this.canvas = document.createElement("canvas");
- this.ctx = this.canvas.getContext('2d');
- this.addCanvasCustomization();
- document.body.appendChild(this.canvas);
- }
- addCanvasCustomization() {
- this.canvas.id = "Minimap";
- this.canvas.width = 200;
- this.canvas.height = 200;
- this.canvas.style.position = "absolute";
- this.canvas.style.border = '3px solid #444444';
- this.canvas.style.top = "74.9%";
- this.canvas.style.right = "0%";
- this.drawUpdate();
- }
- clearCanvas() {
- this.ctx.save();
- this.ctx.setTransform(1, 0, 0, 1, 0, 0);
- this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
- this.ctx.restore();
- }
- drawUpdate() {
- if (!this.ctx) return;
- this.clearCanvas();
- const cWidth = this.canvas.width;
- const cHeight = this.canvas.height;
- this.ctx.strokeStyle = "#ff0000";
- this.ctx.strokeWidth = 1;
- this.ctx.beginPath();
- this.ctx.globalAlpha = 0.9;
- this.ctx.rect(0, 0, cWidth, cHeight);
- this.ctx.fillStyle = "rgba(24,24,24,0.75)";
- this.ctx.fill();
- this.ctx.beginPath();
- let iCount = Math.floor(cWidth / 40);
- let i;
- for (i = 1; i <= iCount; i++) {
- const x = i * 40;
- this.ctx.moveTo(x, 0);
- this.ctx.lineTo(x, cHeight);
- this.ctx.stroke();
- }
- iCount = Math.floor(cHeight / 40);
- for (i = 1; i <= iCount; i++) {
- const y = i * 40;
- this.ctx.moveTo(0, y);
- this.ctx.lineTo(cWidth, y);
- this.ctx.stroke();
- }
- this.ctx.closePath();
- this.drawCellUpdate(window.playerX, window.playerY, "#800000");
- requestAnimationFrame(this.drawUpdate.bind(this));
- }
- drawCellUpdate(x, y, color) {
- const transX = (7071 + x) / 14142 * this.canvas.height;
- const transY = (7071 + y) / 14142 * this.canvas.width;
- this.ctx.fillStyle = color;
- this.ctx.beginPath();
- this.ctx.arc(transX, transY, 6, 0, 2 * Math.PI);
- this.ctx.fill();
- }
- drawBotUpdate() {
- for (const bot of window.bots) {
- const botTransX = (7071 + bot.xPos) / 14142 * this.canvas.height;
- const botTransY = (7071 + bot.yPos) / 14142 * this.canvas.width;
- this.ctx.fillStyle = "#1a46ad";//006400
- this.ctx.beginPath();
- if (bot.xPos !== 0 && bot.yPos !== 0) {
- this.ctx.arc(botTransX, botTransY, 6, 0, 2 * Math.PI);
- }
- this.ctx.fill();
- }
- }
- }
- //Load custom core.
- $.ajax('http://agar.io/agario.core.js', {
- success: core => {
- core = core.replace(/([\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, '$1 window.viewScale=$2; if (window.coordOffsetFixed) { window.playerX=$4+window.offsetX; window.playerY=$5+window.offsetY;}');
- core = core.replace(/(\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, '$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);');
- core = core.replace(/var (\w)=new WebSocket\((\w\(\w\))\);/, 'window.client.url=$2;var $1=new WebSocket(window.client.url);');
- core = core.replace(/if\((\+\w\[\w>>3\])<1\.0\){/i, 'if($1<!client.extraZoom){');
- core = core.replace(/([\w]+\s*=\s*[\w]+\s*\+\s*16\s*\|\s*0;\s*([\w=]+)\s*=\s*\+[\w\[\s*><\]]+;)/, '$1 $2*=0.75;');
- eval(core);
- },
- dataType: 'text',
- method: 'GET',
- cache: false,
- crossDomain: true
- });
- function isInIncognito(callback) {
- var fs = window.RequestFileSystem || window.webkitRequestFileSystem;
- if (!fs) return callback(false);
- fs(window.TEMPORARY, 100, () => callback(false), () => callback(true));
- }
- isInIncognito(incognito => {
- if (incognito) alert('This script will not work fully in incognito, settings won\'t save, and your UID would be forcefully changed. Please exit incognito mode and try again.');
- else runClientLoad();
- });
- function runClientLoad() {
- window.client = new Client('ws://35.196.159.213:8082'); // Bot Server IP.
- client.botMode = localStorage.getItem('botMode') || 'FEEDER'; // Set the bot mode to the stored bot mode.
- client.extraZoom = JSON.parse(localStorage.getItem('extraZoom'));
- client.token = localStorage.getItem('agarUnlimitedToken') || client.genToken();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement