Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function escapeHtml(_0x99fbx2)
- {
- return String(_0x99fbx2)['replace'](/[&<>"'\/]/g, function(_0x99fbx2)
- {
- return entityMap[_0x99fbx2]
- })
- }
- function updateBotCount(_0x99fbx2, b)
- {
- Singa['localBotsAlive'][_0x99fbx2] = b;
- var _0x99fbx5 = 50;
- var _0x99fbx6 = 20 + Singa['serverBots'];
- var _0x99fbx7 = 50;
- for (; _0x99fbx7 < 20; _0x99fbx7++)
- {
- if (Singa['localBotsAlive'][_0x99fbx7])
- {
- _0x99fbx5++
- }
- };
- if (0 == _0x99fbx5)
- {
- $('#botCount')['html']('<font color="green">0 / ' + _0x99fbx6 + '</font>')
- }
- else
- {
- $('#botCount')['html']('<font color="#006600">' + _0x99fbx5 + ' / ' + _0x99fbx6 + '</font>')
- }
- }
- function startLocalBots()
- {
- var _0x99fbx9 = 20;
- for (; _0x99fbx9 < Singa['startBotAmount']; _0x99fbx9++)
- {
- Singa['localBotsAlive'][_0x99fbx9] = true;
- Singa['localBots'][_0x99fbx9] = new Worker(URL['createObjectURL'](new Blob(['(' + generateBotFunction() + ')()'],
- {
- type: 'text/javascript'
- })));
- Singa['localBots'][_0x99fbx9]['onmessage'] = function(_0x99fbx2)
- {
- var b = _0x99fbx2['data'];
- switch (b['name'])
- {
- case 'add':
- updateBotCount(b['botID'], true);
- addBallToMinimap(true, 'bot' + b['botID'], b['botName'], b['x'], b['y'], '#890000', true);
- break;
- case 'remove':
- updateBotCount(b['botID'], false);
- removeBallFromMinimap('bot' + b['botID']);
- break;
- case 'position':
- moveBallOnMinimap('bot' + b['botID'], b['x'], b['y']);
- break;
- default:
- console['log']('Unknown command received from bot')
- }
- };
- Singa['localBots'][_0x99fbx9]['postMessage'](
- {
- name: 'botID',
- botID: _0x99fbx9
- })
- };
- updateBotNames()
- }
- function startRemoteBots()
- {
- var _0x99fbx2 = 2;
- for (; _0x99fbx2 < 2; _0x99fbx2++)
- {
- Singa['remoteBots'][_0x99fbx2] = new Worker(URL['createObjectURL'](new Blob(['(' + generateBotFunction() + ')()'],
- {
- type: 'text/javascript'
- })))
- }
- }
- function sendLocalBotsMessage(_0x99fbx2)
- {
- for (i in Singa['localBots'])
- {
- Singa['localBots'][i]['postMessage'](_0x99fbx2)
- }
- }
- function sendRemoteBotsMessage(_0x99fbx2)
- {
- for (i in Singa['remoteBots'])
- {
- Singa['remoteBots'][i]['postMessage'](_0x99fbx2)
- }
- }
- function insertCore()
- {
- var _0x99fbxe = new XMLHttpRequest;
- _0x99fbxe['open']('GET', '/agario.core.js', true);
- _0x99fbxe['onload'] = function()
- {
- var _0x99fbxf = _0x99fbxe['responseText'];
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onPlayerSpawn)', 'Singa.playerSpawned();if(h.MC&&h.MC.onPlayerSpawn)');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onPlayerDeath)', 'Singa.playerDied();if(h.MC&&h.MC.onPlayerDeath)');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onAgarioCoreLoaded)', 'Singa.onAgarioCoreLoaded();if(h.MC&&h.MC.onAgarioCoreLoaded)');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onDisconnect)', 'Singa.playerDisconnected();if(h.MC&&h.MC.onDisconnect)');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'connect:function(a){', 'connect:function(a){Singa.playerConnected(a);');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'sendSpectate:function(){', 'sendSpectate:function(){Singa.playerSpectated();');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'sendNick:function(a){', 'sendNick:function(a){Singa.updateNickname(a);');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'setTarget:function(a,b){', 'setTarget:function(a,b){if(Singa.stopMovement){a = $(\'#canvas\').width() / 29; b = $(\'#canvas\').height() / 29;}');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /(\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);)/i, '$1 if(Singa.setMapCoords){Singa.setMapCoords($3,$5,$7,$9,$2,$8);}');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /([\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 Singa.playerX=$4; Singa.playerY=$5;');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /if\((\+\w\[\w>>3\])<1\.0\){/i, 'if($1 < Singa.zoomResetValue){');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /(if\(\w<=)(20\.0)(\){\w=\w;return})(if\(!\w\){if\(\(\w\[\d+\]\|0\)!=\(\w\[\d+\]\|0\)\){\w=\w;return}if\(\(\w\[\w\+\d+>>0\]\|0\)!=0\?\(\w\[\w>>0\]\|0\)==0:0\){\w=\w;return}})/i, '$140.0$3');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /(\w)(=\+\w\[\w>>3\]\*\+\w\()(.\d)(,\+\w\);)/i, '$1$2 (Singa.zoomSpeedValue||0.9) $4 Singa.zoomValue=$1;');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /(\w=\w\[\w>>2\]\|0;)((\w\[\w>>3\])=(\w);)(\w\[\w>>0\]=a\[\w>>0\];)/i, '$1 if(!Singa.autoZoom){$3 = Singa.zoomValue;}else{$2}$5');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /((\w)=(\+\(\(\w\[\w\+\d+>>\d.*;)(\w)=(\+\(\(\w\[.*\/2\|\d\)\|0\)\/\w\+\s\+\w\[\w\+\d+>>3\];).*\4=\4<\w\?\w:\w;)/, 'Singa.mouseX = $3 Singa.mouseY = $5 $1');
- eval(_0x99fbxf)
- };
- _0x99fbxe['send']()
- }
- function MinimapBall(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe)
- {
- this['isDefault'] = _0x99fbx2;
- this['name'] = b;
- this['x'] = _0x99fbx5;
- this['y'] = _0x99fbx6;
- this['lastX'] = _0x99fbx5;
- this['lastY'] = _0x99fbx6;
- this['color'] = _0x99fbx7;
- this['visible'] = _0x99fbxe
- }
- function drawMinimap()
- {
- if (null != miniMap ? minimapCtx['clearRect'](0, 0, 200, 200) : (miniMap = document['getElementById']('minimap'), minimapCtx = miniMap['getContext']('2d'), miniMap['width'] = 400, miniMap['height'] = 400, miniMap['style']['width'] = '200px', miniMap['style']['height'] = '200px', minimapCtx['scale'](2, 2)), Singa['mapOffsetFixed'] && Singa['drawMinimap'])
- {
- minimapCtx['globalAlpha'] = 0.4;
- minimapCtx['fillStyle'] = '#1500FF';
- minimapCtx['fillRect'](0, 0, miniMap['width'], miniMap['height']);
- var _0x99fbx2 = 200 / Singa['mapSize'];
- var b = 200 / Singa['mapSize'];
- minimapCtx['globalAlpha'] = 1;
- for (ball in minimapBalls)
- {
- minimapBalls[ball]['draw'](minimapCtx, _0x99fbx2, b)
- }
- }
- }
- function resetMinimap()
- {
- for (ball in minimapBalls)
- {
- if (!minimapBalls[ball]['isDefault'])
- {
- delete minimapBalls[ball]
- }
- }
- }
- function addBallToMinimap(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe, _0x99fbx14)
- {
- minimapBalls[b] = new MinimapBall(_0x99fbx2, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe, _0x99fbx14)
- }
- function removeBallFromMinimap(_0x99fbx2)
- {
- if (minimapBalls[_0x99fbx2])
- {
- delete minimapBalls[_0x99fbx2]
- }
- }
- function moveBallOnMinimap(_0x99fbx2, b, _0x99fbx5)
- {
- if (minimapBalls[_0x99fbx2])
- {
- minimapBalls[_0x99fbx2]['x'] = b;
- minimapBalls[_0x99fbx2]['y'] = _0x99fbx5
- }
- }
- function setBallVisible(_0x99fbx2, b)
- {
- if (minimapBalls[_0x99fbx2])
- {
- minimapBalls[_0x99fbx2]['visible'] = b
- }
- }
- function changeNicknameOnBall(_0x99fbx2, b)
- {
- if (minimapBalls[_0x99fbx2])
- {
- minimapBalls[_0x99fbx2]['name'] = b
- }
- }
- function replaceRegexFile(_0x99fbx2, b, _0x99fbx5)
- {
- var _0x99fbx6 = new RegExp(b);
- return _0x99fbx6['test'](_0x99fbx2) ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
- }
- function replaceNormalFile(_0x99fbx2, b, _0x99fbx5)
- {
- return _0x99fbx2['indexOf'](b) != -1 ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
- }
- function sendCommand(_0x99fbx2)
- {
- if (null != socket)
- {
- if (socket['connected'])
- {
- socket['emit']('command', _0x99fbx2)
- }
- }
- }
- function connectToSingaServer()
- {
- socket = io['connect']('ws://rsagartoolz.tk:8001',
- {
- reconnection: true,
- query: 'key=' + client_uuid
- });
- socket['on']('command', function(_0x99fbx2)
- {
- if (void(0) === _0x99fbx2['name'])
- {
- return void(console)['log']('Recieved a command with no name.')
- };
- switch (_0x99fbx2['name'])
- {
- case 'force-update':
- resetMinimap();
- transmit_current_server(true);
- if (Singa['isAlive'])
- {
- sendCommand(
- {
- name: 'alive',
- playerName: Singa['playerName']
- })
- };
- break;
- case 'add':
- addBallToMinimap(false, _0x99fbx2['socketID'], _0x99fbx2['playerName'], _0x99fbx2['x'], _0x99fbx2['y'], '#1500FF', true);
- break;
- case 'remove':
- removeBallFromMinimap(_0x99fbx2['socketID']);
- break;
- case 'position':
- moveBallOnMinimap(_0x99fbx2['socketID'], _0x99fbx2['x'], _0x99fbx2['y']);
- break;
- case 'count':
- Singa['serverBots'] = _0x99fbx2['count'];
- break;
- case 'auth':
- Singa['isAuthorized'] = true;
- console['log']('Your client is authorized for use of more bots.');
- break;
- default:
- return void(console)['log']('Received a command with an unknown name: ' + _0x99fbx2['name'])
- }
- });
- socket['on']('bots', function(_0x99fbx2)
- {
- if ('server' == _0x99fbx2['name'])
- {
- Singa['remoteBotsServer'] = _0x99fbx2['server']
- };
- sendRemoteBotsMessage(_0x99fbx2)
- });
- socket['on']('disconnect', function()
- {
- resetMinimap();
- sendRemoteBotsMessage(
- {
- name: 'disconnect'
- })
- })
- }
- function updateBotNames()
- {
- sendLocalBotsMessage(
- {
- name: 'names',
- botNames: Singa['botNames']
- });
- if (Singa['isAuthorized'])
- {
- sendCommand(
- {
- name: 'names',
- botNames: Singa['botNames']
- })
- }
- }
- function validateNames(_0x99fbx2)
- {
- if (void(0) === _0x99fbx2)
- {
- return null
- };
- if (_0x99fbx2['indexOf'](',') > -1)
- {
- var b = _0x99fbx2['split'](',');
- for (name in b)
- {
- if (b[name]['length'] <= 0 || b[name]['length'] > 15)
- {
- return null
- }
- };
- return b
- };
- return _0x99fbx2['length'] > 0 && _0x99fbx2['length'] <= 15 ? [_0x99fbx2] : null
- }
- function emitSplit()
- {
- if (Singa['isAuthorized'])
- {
- sendCommand(
- {
- name: 'split'
- })
- };
- sendLocalBotsMessage(
- {
- name: 'split'
- })
- }
- function emitMassEject()
- {
- if (Singa['isAuthorized'])
- {
- sendCommand(
- {
- name: 'eject'
- })
- };
- sendLocalBotsMessage(
- {
- name: 'eject'
- })
- }
- function emitLocalPosition()
- {
- var _0x99fbx2 = Singa['mouseX'];
- var b = Singa['mouseY'];
- if (!Singa['moveToMouse'])
- {
- _0x99fbx2 = Singa['playerX'];
- b = Singa['playerY']
- };
- sendLocalBotsMessage(
- {
- name: 'position',
- x: _0x99fbx2 + Singa['mapOffsetX'],
- y: b + Singa['mapOffsetY']
- })
- }
- function emitPosition()
- {
- var _0x99fbx2 = Singa['mouseX'];
- var b = Singa['mouseY'];
- if (!Singa['moveToMouse'])
- {
- _0x99fbx2 = Singa['playerX'];
- b = Singa['playerY']
- };
- sendCommand(
- {
- name: 'position',
- x: Singa['realPlayerX'],
- y: Singa['realPlayerY'],
- botX: _0x99fbx2 + Singa['mapOffsetX'],
- botY: b + Singa['mapOffsetY']
- })
- }
- function transmit_current_server(_0x99fbx2)
- {
- if (_0x99fbx2 || last_transmited_game_server != Singa['server'])
- {
- last_transmited_game_server = Singa['server'];
- sendCommand(
- {
- name: 'servers',
- server: last_transmited_game_server
- })
- }
- }
- function generateBotFunction()
- {
- return function()
- {
- function replaceRegexFile(_0x99fbx2, b, _0x99fbx5)
- {
- var _0x99fbx6 = new RegExp(b);
- return _0x99fbx6['test'](_0x99fbx2) ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
- }
- function replaceNormalFile(_0x99fbx2, b, _0x99fbx5)
- {
- return _0x99fbx2['indexOf'](b) != -1 ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
- }
- function _0x99fbx25(_0x99fbx2, b)
- {
- return Math['floor'](Math['random']() * (b - _0x99fbx2 + 1)) + _0x99fbx2
- }
- function _0x99fbx26()
- {
- var _0x99fbx7 = new XMLHttpRequest;
- _0x99fbx7['open']('GET', 'http://agar.io/agario.core.js', !0), _0x99fbx7['onload'] = function()
- {
- var _0x99fbxf = _0x99fbx7['responseText'];
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /\w+\.location\.hostname/g, '"agar.io"'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'window', 'self'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'c.setStatus=function(a){console.log(a)};', 'c.setStatus=function(a){};'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'console.log("postRun");', ''), _0x99fbxf = replaceRegexFile(_0x99fbxf, /(\w)=\+\(\(\w\[\w\+\d+>>\d.*;(\w)=\+\(\(\w\[.*\/2\|\d\)\|0\)\/\w\+\s\+\w\[\w\+\d+>>3\];/, '$1 = Singa.newX; $2 = Singa.newY;'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onPlayerSpawn)', 'Singa.playerSpawned();if(h.MC&&h.MC.onPlayerSpawn)'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onPlayerDeath)', 'Singa.playerDied();if(h.MC&&h.MC.onPlayerDeath)'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onAgarioCoreLoaded)', 'Singa.onAgarioCoreLoaded();if(h.MC&&h.MC.onAgarioCoreLoaded)'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onDisconnect)', 'Singa.playerDisconnected();if(h.MC&&h.MC.onDisconnect)'), _0x99fbxf = replaceNormalFile(_0x99fbxf, 'h.MC&&h.MC.corePendingReload', 'Singa.reloadCore();h.MC&&h.MC.corePendingReload'), _0x99fbxf = replaceRegexFile(_0x99fbxf, /(\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);)/i, '$1 if(Singa.setMapCoords){Singa.setMapCoords($3,$5,$7,$9,$2,$8);}'), _0x99fbxf = replaceRegexFile(_0x99fbxf, /([\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 Singa.playerX=$4; Singa.playerY=$5; Singa.setPath();'), _0x99fbxf = replaceRegexFile(_0x99fbxf, /(do\sif\(\w\){)((\w)=!\(\+\w\[\w>>2]<=20.0\);)(.+,\w\[\w>>2\]\|0,(\+\(\+\w\[\w>>2\]\)),(\+\(\+\w\[\w>>2\]\)),\+\((\+\w\[\w>>2\]))/, '$1var cellSize=$7;$2if(!$3){Singa.recordPellet($5,$6,cellSize);}$4'), eval(_0x99fbxf)
- }, _0x99fbx7['send'](null)
- }
- self['innerWidth'] = 1;
- self['innerHeight'] = 1;
- const _0x99fbx27 = {};
- elementMock = {
- getContext: function()
- {
- return {
- canvas:
- {
- width: 1,
- height: 1
- },
- clearRect: function() {},
- save: function() {},
- translate: function() {},
- scale: function() {},
- stroke: function() {},
- arc: function() {},
- fill: function() {},
- moveTo: function() {},
- lineTo: function() {},
- closePath: function() {},
- beginPath: function() {},
- restore: function() {},
- fillRect: function() {},
- measureText: function()
- {
- return {}
- },
- strokeText: function() {},
- fillText: function() {},
- drawImage: function() {}
- }
- },
- innerText: '',
- div:
- {
- appendChild: function() {}
- },
- appendChild: function() {},
- style:
- {}
- };
- document = {
- getElementById: function()
- {
- return elementMock
- },
- createElement: function(_0x99fbx2)
- {
- return elementMock
- },
- body:
- {
- firstChild:
- {},
- insertBefore: function() {}
- }
- };
- Image = function() {};
- self['Singa'] = {
- server: true,
- botID: 0,
- botName: 'EZBots',
- playerX: 0,
- playerY: 0,
- newX: 0,
- newY: 0,
- realPlayerX: null,
- realPlayerY: null,
- mapOffset: 7071,
- mapOffsetX: 0,
- mapOffsetY: 0,
- mapOffsetFixed: false,
- collectPellets: false,
- pelletTargetX: 99999,
- pelletTargetY: 99999,
- pellets: [],
- recordPellet: function(_0x99fbx2, b, _0x99fbx5)
- {
- this['pellets']['push'](
- {
- x: _0x99fbx2,
- y: b,
- size: _0x99fbx5
- })
- },
- setMapCoords: function(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe)
- {
- if (_0x99fbxe - _0x99fbx7 == 24)
- {
- if (_0x99fbx5 - _0x99fbx2 > 14E3)
- {
- if (_0x99fbx6 - b > 14E3)
- {
- this['mapOffsetX'] = this['mapOffset'] - _0x99fbx5;
- this['mapOffsetY'] = this['mapOffset'] - _0x99fbx6;
- this['mapOffsetFixed'] = true
- }
- }
- }
- },
- playerDied: function()
- {
- postMessage(
- {
- name: 'remove',
- botID: Singa['botID']
- })
- },
- playerSpawned: function()
- {
- postMessage(
- {
- name: 'add',
- botID: Singa['botID'],
- botName: Singa['botName'],
- x: Singa['realPlayerX'],
- y: Singa['realPlayerY']
- })
- },
- playerDisconnected: function()
- {
- postMessage(
- {
- name: 'remove',
- botID: Singa['botID']
- });
- if (self['core'])
- {
- if (null != Singa['server'])
- {
- core['connect'](Singa['server'])
- }
- }
- },
- reloadCore: function()
- {
- if (self['core'])
- {
- self['core']['destroy']()
- };
- _0x99fbx26()
- },
- onAgarioCoreLoaded: function()
- {
- self['core'] && null != Singa['server'] && core['connect'](Singa['server']);
- var _0x99fbx28 = Singa['fbToken'];
- console['log'](_0x99fbx28);
- var _0x99fbx29 = [8, 1, 18, _0x99fbx28['length'] + 25, 1, 8, 10, 82, _0x99fbx28['length'] + 20, 1, 8, 2, 18, 13, 8, 5, 18, 5, 50, 46, 49, 46, 50, 24, 0, 32, 0, 26, _0x99fbx28['length'], 1];
- console['log'](_0x99fbx29);
- for (var _0x99fbx2a = 0; _0x99fbx2a < _0x99fbx28['length']; _0x99fbx2a++)
- {
- _0x99fbx29['push'](_0x99fbx28['charCodeAt'](_0x99fbx2a))
- };
- setTimeout(function()
- {
- _0x99fbx27['core']['proxyMobileData'](new Uint8Array(_0x99fbx29))
- }, 1000)
- },
- setPath: function()
- {
- var _0x99fbx2 = -1;
- var b = 0;
- var _0x99fbx5 = 0;
- for (; _0x99fbx5 < this['pellets']['length']; _0x99fbx5++)
- {
- var _0x99fbx6 = this['getDistanceBetweenPositions'](this['pellets'][_0x99fbx5]['x'], this['pellets'][_0x99fbx5]['y'], this['playerX'], this['playerY']);
- if (!(_0x99fbx2 != -1 && _0x99fbx6 > b))
- {
- _0x99fbx2 = _0x99fbx5;
- b = _0x99fbx6
- }
- };
- if (_0x99fbx2 == -1)
- {
- this['pelletTargetX'] = 99999;
- this['pelletTargetY'] = 99999
- }
- else
- {
- this['pelletTargetX'] = this['pellets'][_0x99fbx2]['x'];
- this['pelletTargetY'] = this['pellets'][_0x99fbx2]['y']
- };
- this['pellets'] = []
- },
- getDistanceBetweenPositions: function(_0x99fbx2, b, _0x99fbx5, _0x99fbx6)
- {
- return Math['sqrt'](Math['pow'](_0x99fbx5 - _0x99fbx2, 2) + Math['pow'](b - _0x99fbx6, 2))
- }
- };
- onmessage = function(_0x99fbx2)
- {
- var b = _0x99fbx2['data'];
- switch (b['name'])
- {
- case 'botID':
- Singa['botID'] = b['botID'];
- break;
- case 'server':
- Singa['server'] = b['server'];
- if (self['core'])
- {
- if (null != b['server'])
- {
- core['connect'](b['server'])
- }
- };
- break;
- case 'position':
- if (Singa['collectPellets'] && (99999 != Singa['pelletTargetX'] && 99999 != Singa['pelletTargetY']))
- {
- Singa['newX'] = Singa['pelletTargetX'];
- Singa['newY'] = Singa['pelletTargetY']
- }
- else
- {
- Singa['newX'] = b['x'] - Singa['mapOffsetX'];
- Singa['newY'] = b['y'] - Singa['mapOffsetY']
- };
- break;
- case 'split':
- if (self['core'])
- {
- core['split']()
- };
- break;
- case 'eject':
- if (self['core'])
- {
- core['eject']()
- };
- break;
- case 'names':
- if (null == b['botNames'])
- {
- Singa['botName'] = 'EZbots';
- break
- };
- Singa['botName'] = b['botNames'][_0x99fbx25(0, b['botNames']['length'] - 1)];
- break;
- case 'disconnect':
- Singa['server'] = null;
- if (self['core'])
- {
- core['disconnect']()
- };
- break;
- case 'collectPellets':
- Singa['collectPellets'] = b['collectPellets'];
- break;
- case 'fb':
- Singa['fbToken'] = b['token'];
- console['log'](b['token']);
- default:
- console['log']('Unknown message received.')
- }
- };
- setInterval(function()
- {
- Singa['realPlayerX'] = Singa['mapOffsetX'] + Singa['playerX'];
- Singa['realPlayerY'] = Singa['mapOffsetY'] + Singa['playerY'];
- postMessage(
- {
- botID: Singa['botID'],
- name: 'position',
- x: Singa['realPlayerX'],
- y: Singa['realPlayerY']
- });
- if (self['core'])
- {
- core['sendNick'](Singa['botName'])
- }
- }, 100);
- _0x99fbx26()
- }.toString()
- }
- window['history']['replaceState']('', '', '/' + location['hash']), window['getTextWidth'] = function(_0x99fbx2, b)
- {
- var _0x99fbx5 = getTextWidth['canvas'] || (getTextWidth['canvas'] = document['createElement']('canvas'));
- var _0x99fbx6 = _0x99fbx5['getContext']('2d');
- _0x99fbx6['font'] = b;
- var _0x99fbx7 = _0x99fbx6['measureText'](_0x99fbx2);
- return _0x99fbx7['width']
- };
- var entityMap = {
- "\x26": '&',
- "\x3C": '<',
- "\x3E": '>',
- "\x22": '"',
- "\x27": ''',
- "\x2F": '/'
- };
- var client_uuid = escapeHtml(localStorage['getItem']('ncEpHnKnIcWIFUmJyPxDBQMay0DOkM'));
- if (null === client_uuid || 15 != client_uuid['length'])
- {
- client_uuid = 'ncEpHnKnIcWIFUmJyPxDBQMay0DOkM';
- var ranStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- var ii = 0;
- for (; ii < 15; ii++)
- {
- client_uuid += ranStr['charAt'](Math['floor'](Math['random']() * ranStr['length']))
- };
- localStorage['setItem']('ncEpHnKnIcWIFUmJyPxDBQMay0DOkM', client_uuid)
- };
- window['Singa'] = {
- server: null,
- playerName: '',
- startBotAmount: 30,
- playerX: 0,
- playerY: 0,
- mouseX: 0,
- mouseY: 0,
- realPlayerX: null,
- realPlayerY: null,
- mapSize: 14142,
- mapOffset: 7071,
- mapOffsetX: 0,
- mapOffsetY: 0,
- mapOffsetFixed: false,
- zoomValue: 1,
- zoomResetValue: 0,
- zoomSpeedValue: 0.9,
- autoZoom: true,
- stopMovement: false,
- isAlive: true,
- moveToMouse: true,
- localBots:
- {},
- localBotsAlive:
- {},
- remoteBotsServer: 7,
- remoteBots:
- {},
- remoteBotsAlive:
- {},
- leaderboardData: '',
- serverBots: 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999,
- isAuthorized: true,
- drawMinimap: true,
- setMapCoords: function(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe)
- {
- if (_0x99fbxe - _0x99fbx7 == 24)
- {
- if (_0x99fbx5 - _0x99fbx2 > 14E3)
- {
- if (_0x99fbx6 - b > 14E3)
- {
- this['mapOffsetX'] = this['mapOffset'] - _0x99fbx5;
- this['mapOffsetY'] = this['mapOffset'] - _0x99fbx6;
- this['mapOffsetFixed'] = true
- }
- }
- }
- },
- playerDied: function()
- {
- Singa['isAlive'] = false;
- moveBallOnMinimap('player_death', this['realPlayerX'], this['realPlayerY']);
- setBallVisible('player_pointer', false);
- setBallVisible('player_death', true);
- sendCommand(
- {
- name: 'dead'
- })
- },
- playerSpawned: function()
- {
- Singa['isAlive'] = true;
- changeNicknameOnBall('player_pointer', Singa['playerName']);
- setBallVisible('player_spectate', false);
- setBallVisible('player_pointer', true);
- sendCommand(
- {
- name: 'alive',
- playerName: Singa['playerName']
- })
- },
- playerConnected: function(_0x99fbx2)
- {
- resetMinimap();
- if (null != this['remoteBotsServer'])
- {
- if (this['remoteBotsServer'] == _0x99fbx2)
- {
- sendRemoteBotsMessage(
- {
- name: 'disconnect'
- })
- }
- };
- Singa['server'] = _0x99fbx2;
- console['log']('Connecting to: ' + _0x99fbx2);
- setBallVisible('player_pointer', false);
- setBallVisible('player_death', false);
- setBallVisible('player_spectate', false);
- sendLocalBotsMessage(
- {
- name: 'server',
- server: _0x99fbx2
- })
- },
- playerDisconnected: function()
- {
- resetMinimap();
- sendCommand(
- {
- name: 'dead'
- });
- setBallVisible('player_pointer', false);
- setBallVisible('player_death', false);
- setBallVisible('player_spectate', false);
- Singa['server'] = null;
- Singa['isAlive'] = false
- },
- playerSpectated: function()
- {
- setBallVisible('player_pointer', false);
- setBallVisible('player_spectate', true);
- sendCommand(
- {
- name: 'dead'
- })
- },
- updateNickname: function(_0x99fbx2)
- {
- this['playerName'] = _0x99fbx2
- },
- loadCore: function()
- {
- setTimeout(function()
- {
- startLocalBots();
- startRemoteBots()
- }, 2E3);
- console['log']('Loading core.');
- var _0x99fbx2f = (document['getElementById']('canvas'), localStorage['getItem']('botnames'));
- if (null !== _0x99fbx2f)
- {
- Singa['botNames'] = validateNames(_0x99fbx2f);
- if (null !== Singa['botNames'])
- {
- $('#botnames')['val'](_0x99fbx2f)
- };
- updateBotNames()
- };
- $('#botnames')['on']('input', function()
- {
- var _0x99fbx2 = $('#botnames')['val']();
- var b = validateNames(_0x99fbx2);
- Singa['botNames'] = b;
- updateBotNames();
- if (null !== b)
- {
- localStorage['setItem']('botnames', _0x99fbx2)
- }
- });
- $('#leaderboardcopy')['click'](function(_0x99fbx2)
- {
- var b = $('#leaderboard')[0];
- b['setSelectionRange'](0, b['value']['length']);
- b['select']();
- try
- {
- document['execCommand']('copy')
- }
- catch (a$$0)
- {
- console['log']('Failed to copy leaderboard.')
- }
- });
- $('#uuidcopy')['click'](function(_0x99fbx2)
- {
- var b = $('#uuid')[0];
- b['setSelectionRange'](0, b['value']['length']);
- b['select']();
- try
- {
- document['execCommand']('copy')
- }
- catch (a$$0)
- {
- console['log']('Failed to copy uuid.')
- }
- });
- var _0x99fbx5;
- var _0x99fbx6 = true;
- var _0x99fbx30 = true;
- $(document)['keydown'](function(_0x99fbx2)
- {
- switch (_0x99fbx2['which'])
- {
- case 65:
- Singa['moveToMouse'] = !Singa['moveToMouse'];
- if (Singa['moveToMouse'])
- {
- $('#ismoveToMouse')['html']('<font color=\'#7FFF00\'>On</font>')
- }
- else
- {
- $('#ismoveToMouse')['html']('<font color=\'green\'>Off</font>')
- };
- break;
- case 68:
- Singa['stopMovement'] = !Singa['stopMovement'];
- if (Singa['stopMovement'])
- {
- $('#isStopMove')['html']('<font color=\'#7FFF00\'>On</font>')
- }
- else
- {
- $('#isStopMove')['html']('<font color=\'green\'>Off</font>')
- };
- break;
- case 69:
- emitSplit();
- break;
- case 82:
- emitMassEject();
- break;
- case 77:
- Singa['drawMinimap'] = !Singa['drawMinimap'];
- if (Singa['drawMinimap'])
- {
- $('#botcanvas')['show']()
- }
- else
- {
- $('#botcanvas')['hide']()
- };
- break;
- case 80:
- _0x99fbx30 = !_0x99fbx30;
- if (_0x99fbx30)
- {
- $('#collectPellets')['html']('<font color=\'#CBFF44\'>On</font>')
- }
- else
- {
- $('#collectPellets')['html']('<font color=\'green\'>Off</font>')
- };
- sendLocalBotsMessage(
- {
- name: 'collectPellets',
- collectPellets: _0x99fbx30
- });
- if (Singa['isAuthorized'])
- {
- sendCommand(
- {
- name: 'collectPellets',
- collectPellets: _0x99fbx30
- })
- };
- break;
- case 87:
- if (_0x99fbx6)
- {
- return
- };
- _0x99fbx6 = true;
- _0x99fbx5 = setInterval(function()
- {
- core['eject']()
- }, 50)
- }
- });
- $(document)['keyup'](function(_0x99fbx2)
- {
- switch (_0x99fbx2['which'])
- {
- case 87:
- _0x99fbx6 = false;
- clearInterval(_0x99fbx5);
- break;
- case 84:
- var b = 0;
- var _0x99fbx7 = setInterval(function()
- {
- return b > 7 ? void(clearInterval)(_0x99fbx7) : (b++, void(core)['split']())
- }, 50);
- break;
- case 81:
- var _0x99fbxe = 0;
- var _0x99fbx14 = setInterval(function()
- {
- return _0x99fbxe > 1 ? void(clearInterval)(_0x99fbx14) : (_0x99fbxe++, void(core)['split']())
- }, 50)
- }
- });
- addBallToMinimap(true, 'player_pointer', Singa['playerName'], Singa['realPlayerX'], Singa['realPlayerY'], '#158B00', false);
- addBallToMinimap(true, 'player_death', 'Last Death', Singa['realPlayerX'], Singa['realPlayerY'], '#E50000', false);
- addBallToMinimap(true, 'player_spectate', 'Spectate', Singa['realPlayerX'], Singa['realPlayerY'], '#FFFFFF', false);
- connectToSingaServer();
- insertCore();
- setInterval(function()
- {
- MC['singaFreeCoins']()
- }, 5E3);
- setInterval(function()
- {
- drawMinimap()
- }, 33)
- },
- reloadCore: function()
- {
- console['log']('Reloading Core.');
- insertCore()
- },
- onAgarioCoreLoaded: function()
- {
- window['skinHack'] = new skinHack();
- console['log']('Loading settings into agario core.');
- core['setSkins'](!$('#noSkins')['is'](':checked'));
- core['setNames'](!$('#noNames')['is'](':checked'));
- core['setColors'](!$('#noColors')['is'](':checked'));
- core['setShowMass']($('#showMass')['is'](':checked'));
- core['setDarkTheme']($('#darkTheme')['is'](':checked'))
- }
- };
- var tempLeaderBoard = '';
- var tempLeaderBoardIndex = 1;
- CanvasRenderingContext2D['prototype']['_fillText'] = CanvasRenderingContext2D['prototype']['fillText'], CanvasRenderingContext2D['prototype']['fillText'] = function()
- {
- this['_fillText']['apply'](this, arguments);
- if ('27' === arguments[0])
- {
- if ('' != tempLeaderBoard)
- {
- Singa['leaderboardData'] = tempLeaderBoard;
- $('#leaderboard')['val'](Singa['leaderboardData'])
- };
- tempLeaderBoardIndex = 1;
- tempLeaderBoard = ''
- }
- else
- {
- if (':teams' != $('#gamemode')['val']() && (0 == arguments[0]['indexOf'](tempLeaderBoardIndex + '.') && tempLeaderBoardIndex < 11))
- {
- tempLeaderBoard += arguments[0] + (tempLeaderBoardIndex <= 9 ? ', ' : '');
- tempLeaderBoardIndex++
- }
- else
- {
- this['_fillText']['apply'](this, arguments)
- }
- }
- }, CanvasRenderingContext2D['prototype']['_drawImage'] = CanvasRenderingContext2D['prototype']['drawImage'], CanvasRenderingContext2D['prototype']['drawImage'] = function()
- {
- if (arguments[0]['src'])
- {
- if ('http://agar.io/img/background.png' == arguments[0]['src'])
- {
- arguments[0]['src'] = ''
- }
- };
- this['_drawImage']['apply'](this, arguments)
- };
- var miniMap = null;
- var minimapCtx = null;
- minimapBalls = {}, MinimapBall['prototype'] = {
- draw: function(_0x99fbx2, b, _0x99fbx5)
- {
- if (this['visible'])
- {
- this['lastX'] = (29 * this['lastX'] + this['x']) / 30;
- this['lastY'] = (29 * this['lastY'] + this['y']) / 30;
- var _0x99fbx6 = ((this['isDefault'] ? this['x'] : this['lastX']) + Singa['mapOffset']) * b;
- var _0x99fbx7 = ((this['isDefault'] ? this['y'] : this['lastY']) + Singa['mapOffset']) * _0x99fbx5;
- _0x99fbx2['fillStyle'] = this['color'];
- _0x99fbx2['font'] = '10px Ubuntu';
- _0x99fbx2['textAlign'] = 'center';
- _0x99fbx2['fillText']('' == this['name'] ? 'EZBots' : this['name'], _0x99fbx6, _0x99fbx7 - 10);
- _0x99fbx2['beginPath']();
- _0x99fbx2['arc'](_0x99fbx6, _0x99fbx7, 4.5, 0, 2 * Math['PI'], false);
- _0x99fbx2['closePath']();
- _0x99fbx2['fillStyle'] = this['color'];
- _0x99fbx2['fill']()
- }
- }
- };
- var b = new XMLHttpRequest;
- b['open']('GET', '/mc/agario.js', true), b['onload'] = function()
- {
- var _0x99fbxf = b['responseText'];
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(js.keyCode==32&&i1!="nick"){js.preventDefault()}', '');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'showAds:function(i){if', 'showAds:function(i){},showFuck:function(i){if');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'showPromoBadge:function(', 'showPromoBadge:function(i){},fuckbacks: function(');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /(return\s\w+.tab.toUpperCase\(\)).indexOf\(\w+.toUpperCase\(\)\)!=-1/, '$1 != \'VETERAN\'');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /if\(\w+.shouldSkipConfigEntry\(\w+.productIdToQuantify.*visibility\)\)\{continue\}/, '');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(this.getSkinsByCategory(i1.tabDescription).length>0', 'if (this.getSkinsByCategory(i1.tabDescription).length > 0 && (i1.tabDescription.toUpperCase() == "PREMIUM" || i1.tabDescription.toUpperCase() == "VETERAN" || i1.tabDescription.toUpperCase() == "OWNED")');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /var\si2=window.document.createElement..script..+head.appendChild.i2../i, 'Singa.reloadCore();');
- _0x99fbxf = replaceRegexFile(_0x99fbxf, /(showFreeCoins:function\(\)\{var.*showContainer\(\);if\(([a-zA-Z0-9]+[a-zA-Z0-9]+.user.userInfo==null).*false\);([a-zA-Z0-9]+[a-zA-Z0-9]+.triggerFreeCoins\(\)).*this.onShopClose\)\)\}},)/, '$1 singaFreeCoins: function(){if($2){return;}$3;},');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'onPlayerBanned:function(i)', 'onPlayerBanned: function(i){},shitfacefuck:function(i)');
- _0x99fbxf = replaceNormalFile(_0x99fbxf, 'setPopupActiveState:function(i){', 'setPopupActiveState:function(i){console.log(\'stopped annoying ad\');return;');
- eval(_0x99fbxf);
- var _0x99fbx7 = new XMLHttpRequest;
- _0x99fbx7['open']('GET', '/', true);
- _0x99fbx7['onload'] = function()
- {
- var _0x99fbx2 = _0x99fbx7['responseText'];
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, 'kjYztklZX7lNboE', 'kjYztklZX7lNboE');
- _0x99fbx2 = replaceRegexFile(_0x99fbx2, /<footer[\S\s]*\/footer>/i, '');
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<script src="agario.core.js" async></script>', '<div id=\'botcanvas\' style=\'background:rgba(0,0,0,0.4); width: 200px; top: 5px; left: 9px; display: block; position: absolute; text-align: center; font-size: 15px; color: #000000; padding: 5px; font-family: Hacked;\'> <font color=\'#0000FF\'>EZBots</font><br>Bots: <a id=\'botCount\'><font color=\'red\'>0 / 50</font></a><br><font color=\'#000000\'>A</font> - Move To Mouse: <a id=\'ismoveToMouse\'><font color=\'#FF0000\'>On</font></a><br><font color=\'#000000\'>P</font> - Collect Pellets: <a id=\'collectPellets\'><font color=\'red\'>Off</font></a><br><font color=\'#000000\'>D</font> - Stop Movement: <a id=\'isStopMove\'><font color=\'red\'>Off</font></a></div>');
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<body>', '<body onload="Singa.loadCore()">');
- _0x99fbx2 = replaceRegexFile(_0x99fbx2, /<script type="text\/javascript" src="mc\/agario\.js.*"><\/script>/i, '');
- _0x99fbx2 = replaceRegexFile(_0x99fbx2, /<div id="adsBottom".*display:block;">/i, '<div id="adsBottom" style="display:none">');
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<div class="diep-cross" style="', '<div class="diep-cross" style="display:none;');
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<div id="promo-badge-container">', '<div id="promo-badge-container" style="display:none;">');
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<span data-itr="page_instructions_w"></span><br/>', '<span data-itr="page_instructions_w"></span><br/><span>Press <b>Q</b> to double split</span><br><br><span>Press <b>M</b> to hide/show the minimap</span><br><span>Press <b>E</b> to split bots</span><br><span>Press <b>R</b> to eject some bots mass</span><br><span>Press <b>P</b> to make bots collect pellets</span><br><span>By : <bold>NexuzPlays</bold> !</span>');
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<div id="tags-container">', '<div id="leaders" class="input-group" style="margin-top: 6px;"><span class="input-group-addon" style="width:75px"id="basic-addon1">BoarD</span><input id="leaderboard" type="text" value="" style="width:185px" readonly class="form-control"><button id="leaderboardcopy" class="btn btn-primary" style="float: right; width: 60px; border-radius: 0px 4px 4px 0px;" data-original-title="" title="">Copy</button></div><div class="input-group" style="margin-top: 6px;"><span class="input-group-addon" style="width:75px"id="basic-addon1">UUID</span><input id="uuid" type="text" value="' + client_uuid + '" style="width:185px" readonly class="form-control"><button id="uuidcopy" class="btn btn-primary" style="float: right; width: 60px; border-radius: 0px 4px 4px 0px;" data-original-title="" title="">Copy</button></div><div class="input-group" style="margin-top: 6px;"><span class="input-group-addon" style="width:75px" id="basic-addon1">NAMES</span><input id="botnames" class="form-control" style="width:245px" placeholder="Separate bot names using commas" autofocus=""></div><div id="tags-container"><center><span><bold>Subscribe To My Channel : NexuzPlays</bold></span></center>');
- _0x99fbx2 = replaceNormalFile(_0x99fbx2, '</body>', '<div style="display:block;position:absolute;z-index:100;pointer-events:none;right:9px;bottom:9px;"><canvas id="minimap"></div></body>');
- document['open']();
- document['write'](_0x99fbx2);
- document['close']()
- };
- _0x99fbx7['send']()
- }, b['send'](), setInterval(function()
- {
- Singa['realPlayerX'] = Singa['mapOffsetX'] + Singa['playerX'];
- Singa['realPlayerY'] = Singa['mapOffsetY'] + Singa['playerY'];
- moveBallOnMinimap('player_pointer', Singa['realPlayerX'], Singa['realPlayerY']);
- moveBallOnMinimap('player_spectate', Singa['realPlayerX'], Singa['realPlayerY'])
- }, 50);
- var last_transmited_game_server = null;
- var socket = null;
- setInterval(function()
- {
- if (!Singa['isAuthorized'])
- {
- emitPosition()
- }
- }, 10), setInterval(function()
- {
- if (Singa['isAuthorized'])
- {
- emitPosition()
- };
- emitLocalPosition();
- transmit_current_server(false)
- }, 10);
- window['interval'] = setInterval(function()
- {
- if (MC['coreWasLoaded'] == true && $('#nick')[0])
- {
- clearInterval(interval);
- $('#agarYoutube')['replaceWith']('<script src=\'https://apis.google.com/js/platform.js\'></script> <div class=\'g-ytsubscribe\' data-channelid=\'UCZhE-1KGsyXOVKHr0jzfcWw\' data-layout=\'default\' data-count=\'default\'></div>');
- $('#agarTwitter')['remove']();
- $('#agarfacebook')['remove']();
- $('h2')['replaceWith']('<h1>EZBots</h1>')
- }
- }, 100);
- function skinHack()
- {
- this['currentSkin'] = '';
- this['configUrlBase'] = window['EnvConfig']['config_url'] + '/' + localStorage['getItem']('last_config_id') + '/';
- this['configUrl'] = this['configUrlBase'] + 'GameConfiguration.json';
- this['skinObj'] = {};
- this['rotateInterval'] = 1000;
- this['playerName'] = '';
- this['canUseScript'] = false;
- this['downloadConfig']()
- }
- skinHack['prototype'] = {
- downloadConfig: function()
- {
- var _0x99fbx38 = this['onDownload']['bind'](this);
- $['ajax'](
- {
- type: 'GET',
- url: this['configUrl'],
- success: function(_0x99fbx39)
- {
- _0x99fbx38(_0x99fbx39)
- },
- error: function(_0x99fbx3a, _0x99fbx3b, _0x99fbx3c) {}
- })
- },
- onDownload: function(_0x99fbx39)
- {
- this['handleSkinData'](_0x99fbx39);
- this['injectHtml']();
- this['overrideSetNick']();
- this['initSkinRotation']();
- this['updateSkin']()
- },
- handleSkinData: function(_0x99fbx39)
- {
- var _0x99fbx3d = _0x99fbx39['gameConfig']['Shop - Skins'];
- var _0x99fbx3e = _0x99fbx39['gameConfig']['Gameplay - Equippable Skins'];
- for (var _0x99fbx2a = 0; _0x99fbx2a < _0x99fbx3e['length']; _0x99fbx2a++)
- {
- var _0x99fbx3f = _0x99fbx3e[_0x99fbx2a];
- this['skinObj'][_0x99fbx3f['productId']] = {
- image: _0x99fbx3f['image'],
- color: _0x99fbx3f['cellColor']
- }
- };
- for (var _0x99fbx2a = 0; _0x99fbx2a < _0x99fbx3d['length']; _0x99fbx2a++)
- {
- var _0x99fbx3f = _0x99fbx3d[_0x99fbx2a];
- this['skinObj'][_0x99fbx3f['productIdToQuantify']]['title'] = _0x99fbx3f['title']
- }
- },
- injectHtml: function()
- {
- $('#advertisement')['hide']();
- $('.agario-promo')['remove']();
- $('.diep-cross')['remove']();
- $('#agario-web-incentive')['remove']();
- $('<div class="agario-panel agario-side-panel"><img id="skinPreview" class="circle bordered"src=""width="96"height="96"style="height: 96px; border: 3px solid rgb(0, 44, 108);margin: 0 auto;"><br><select id="skinsList"class="form-control"onchange="window.skinHack.updateSkin()"required=""></select><br><div id="skinRotator"style="margin: auto"><label>Skin Rotator: </label><div style="left: 13px" class="btn-group btn-toggle"><button class="btn btn-sm active btn-default">ON</button><button class="btn btn-sm active btn-primary">OFF</button></div></div></div>')['insertAfter']('.agario-party');
- this['addSkinOption'](
- {
- image: '',
- color: '0x00000000',
- title: 'Default Skin'
- });
- for (var _0x99fbx40 in this['skinObj'])
- {
- if (this['skinObj']['hasOwnProperty'](_0x99fbx40) && this['skinObj'][_0x99fbx40]['title'])
- {
- this['addSkinOption'](this['skinObj'][_0x99fbx40])
- }
- };
- $('.btn-toggle')['click'](function()
- {
- $(this)['find']('.btn')['toggleClass']('active');
- if ($(this)['find']('.btn-primary')['size']() > 0)
- {
- $(this)['find']('.btn')['toggleClass']('btn-primary')
- };
- if ($(this)['find']('.btn-info')['size']() > 0)
- {
- $(this)['find']('.btn')['toggleClass']('btn-info')
- };
- $(this)['find']('.btn')['toggleClass']('btn-default')
- });
- this['preLoadSkins']();
- $('#openfl-content')['click'](this['updateSkin']['bind'](this))
- },
- preLoadSkins: function()
- {
- for (var _0x99fbx41 in this['skinObj'])
- {
- if (this['skinObj']['hasOwnProperty'](_0x99fbx41))
- {
- (new Image())['src'] = this['configUrlBase'] + this['skinObj'][_0x99fbx41]['image']
- }
- }
- },
- addSkinOption: function(_0x99fbx3f)
- {
- _0x99fbx3f['title'] = _0x99fbx3f['title']['split']('product_name_skin_')[1];
- $('#skinsList')['append']('<option value="' + _0x99fbx3f['image'] + ':' + _0x99fbx3f['color'] + '">' + _0x99fbx3f['title'] + '</option>')
- },
- overrideSetNick: function()
- {
- window['MC']['_setNick'] = window['MC']['setNick'];
- window['MC']['setNick'] = function()
- {
- var _0x99fbx42 = arguments[0];
- if (_0x99fbx42 === '')
- {
- this['playerName'] = 'EZBots';
- _0x99fbx42 = 'EZBots';
- console['log']('Overriding')
- }
- else
- {
- this['playerName'] = _0x99fbx42
- };
- window['MC']._setNick(_0x99fbx42);
- this['updateSkin']()
- }['bind'](this)
- },
- checkSubscription: function()
- {
- try
- {
- if (localStorage['getItem']('canUseScript'))
- {
- this['canUseScript'] = JSON['parse'](localStorage['getItem']('canUseScript')['toLowerCase']())
- }
- else
- {
- localStorage['setItem']('canUseScript', 'false');
- return this['promptSubscription']()
- };
- if (!this['canUseScript'])
- {
- return this['promptSubscription']()
- };
- return this['canUseScript']
- }
- catch (err)
- {
- console['log'](err)
- }
- },
- promptSubscription: function()
- {
- var _0x99fbx43 = window['confirm']('You must subscribe to NexuzPlays to <strong>use</strong> this Script');
- if (_0x99fbx43)
- {
- var _0x99fbx44 = window['open']('https://www.youtube.com/channel/UClVnhew8toDIjY4Ew90inOg', '_blank');
- if (_0x99fbx44)
- {
- localStorage['setItem']('canUseScript', 'true');
- this['canUseScript'] = true;
- this['updateSkin']()
- }
- else
- {
- alert('Please allow VPN and refresh the page first!')
- }
- };
- return this['canUseScript']()
- },
- updateSkin: function()
- {
- var _0x99fbx45 = $('#skinsList')['val']()['split'](':');
- var _0x99fbx46 = _0x99fbx45[0]['length'] > 0;
- var _0x99fbx47 = _0x99fbx46 ? this['configUrlBase'] + _0x99fbx45[0] : document['getElementsByClassName']('circle bordered')[0]['src'];
- var _0x99fbx48 = _0x99fbx46 ? parseInt(_0x99fbx45[1]['slice'](0, _0x99fbx45[1]['length'] - 2)) : parseInt(this['rgbToHex'](document['getElementsByClassName']('circle bordered')[0]['style']['borderColor'])['slice'](1, 7), 16);
- var _0x99fbx42 = this['playerName'];
- window['core']['registerSkin'](_0x99fbx42, null, _0x99fbx47, _0x99fbx47 ? 2 : 0, _0x99fbx47 ? _0x99fbx48 : null);
- $('#skinPreview')['attr']('src', _0x99fbx47);
- var _0x99fbx49 = ['top', 'right', 'bottom', 'left'];
- for (var _0x99fbx2a = 0; _0x99fbx2a < array['length']; _0x99fbx2a++)
- {
- $('#skinPreview')['css']('border-' + array[_0x99fbx2a] + '-color', '#' + _0x99fbx48.toString(16))
- }
- },
- rgbToHex: function(_0x99fbx48)
- {
- if (_0x99fbx48['substr'](0, 1) === '#')
- {
- return _0x99fbx48
- };
- var _0x99fbx4a = /(.*?)rgb\((\d+), (\d+), (\d+)\)/ ['exec'](_0x99fbx48);
- var _0x99fbx4b = parseInt(_0x99fbx4a[2]);
- var _0x99fbx4c = parseInt(_0x99fbx4a[3]);
- var _0x99fbx4d = parseInt(_0x99fbx4a[4]);
- var _0x99fbx4e = _0x99fbx4d | (_0x99fbx4c << 8) | (_0x99fbx4b << 16);
- return _0x99fbx4a[1] + '#' + _0x99fbx4e.toString(16)
- },
- initSkinRotation: function()
- {
- setInterval(function()
- {
- if ($('.btn-toggle')['find']('.btn-primary')['html']() === 'ON')
- {
- $('#skinsList')[0]['selectedIndex'] = ($('#skinsList')[0]['selectedIndex'] + 1) % $('#skinsList')[0]['length'];
- this['updateSkin']()
- }
- }['bind'](this), this['rotateInterval'])
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement