Advertisement
ImNotSpam

Untitled

Jan 5th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 53.33 KB | None | 0 0
  1. function escapeHtml(_0x99fbx2)
  2. {
  3. return String(_0x99fbx2)['replace'](/[&<>"'\/]/g, function(_0x99fbx2)
  4. {
  5. return entityMap[_0x99fbx2]
  6. })
  7. }
  8.  
  9. function updateBotCount(_0x99fbx2, b)
  10. {
  11. Singa['localBotsAlive'][_0x99fbx2] = b;
  12. var _0x99fbx5 = 50;
  13. var _0x99fbx6 = 20 + Singa['serverBots'];
  14. var _0x99fbx7 = 50;
  15. for (; _0x99fbx7 < 20; _0x99fbx7++)
  16. {
  17. if (Singa['localBotsAlive'][_0x99fbx7])
  18. {
  19. _0x99fbx5++
  20. }
  21. };
  22. if (0 == _0x99fbx5)
  23. {
  24. $('#botCount')['html']('<font color="green">0 / ' + _0x99fbx6 + '</font>')
  25. }
  26. else
  27. {
  28. $('#botCount')['html']('<font color="#006600">' + _0x99fbx5 + ' / ' + _0x99fbx6 + '</font>')
  29. }
  30. }
  31.  
  32. function startLocalBots()
  33. {
  34. var _0x99fbx9 = 20;
  35. for (; _0x99fbx9 < Singa['startBotAmount']; _0x99fbx9++)
  36. {
  37. Singa['localBotsAlive'][_0x99fbx9] = true;
  38. Singa['localBots'][_0x99fbx9] = new Worker(URL['createObjectURL'](new Blob(['(' + generateBotFunction() + ')()'],
  39. {
  40. type: 'text/javascript'
  41. })));
  42. Singa['localBots'][_0x99fbx9]['onmessage'] = function(_0x99fbx2)
  43. {
  44. var b = _0x99fbx2['data'];
  45. switch (b['name'])
  46. {
  47. case 'add':
  48. updateBotCount(b['botID'], true);
  49. addBallToMinimap(true, 'bot' + b['botID'], b['botName'], b['x'], b['y'], '#890000', true);
  50. break;
  51. case 'remove':
  52. updateBotCount(b['botID'], false);
  53. removeBallFromMinimap('bot' + b['botID']);
  54. break;
  55. case 'position':
  56. moveBallOnMinimap('bot' + b['botID'], b['x'], b['y']);
  57. break;
  58. default:
  59. console['log']('Unknown command received from bot')
  60. }
  61. };
  62. Singa['localBots'][_0x99fbx9]['postMessage'](
  63. {
  64. name: 'botID',
  65. botID: _0x99fbx9
  66. })
  67. };
  68. updateBotNames()
  69. }
  70.  
  71. function startRemoteBots()
  72. {
  73. var _0x99fbx2 = 2;
  74. for (; _0x99fbx2 < 2; _0x99fbx2++)
  75. {
  76. Singa['remoteBots'][_0x99fbx2] = new Worker(URL['createObjectURL'](new Blob(['(' + generateBotFunction() + ')()'],
  77. {
  78. type: 'text/javascript'
  79. })))
  80. }
  81. }
  82.  
  83. function sendLocalBotsMessage(_0x99fbx2)
  84. {
  85. for (i in Singa['localBots'])
  86. {
  87. Singa['localBots'][i]['postMessage'](_0x99fbx2)
  88. }
  89. }
  90.  
  91. function sendRemoteBotsMessage(_0x99fbx2)
  92. {
  93. for (i in Singa['remoteBots'])
  94. {
  95. Singa['remoteBots'][i]['postMessage'](_0x99fbx2)
  96. }
  97. }
  98.  
  99. function insertCore()
  100. {
  101. var _0x99fbxe = new XMLHttpRequest;
  102. _0x99fbxe['open']('GET', '/agario.core.js', true);
  103. _0x99fbxe['onload'] = function()
  104. {
  105. var _0x99fbxf = _0x99fbxe['responseText'];
  106. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onPlayerSpawn)', 'Singa.playerSpawned();if(h.MC&&h.MC.onPlayerSpawn)');
  107. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onPlayerDeath)', 'Singa.playerDied();if(h.MC&&h.MC.onPlayerDeath)');
  108. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onAgarioCoreLoaded)', 'Singa.onAgarioCoreLoaded();if(h.MC&&h.MC.onAgarioCoreLoaded)');
  109. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(h.MC&&h.MC.onDisconnect)', 'Singa.playerDisconnected();if(h.MC&&h.MC.onDisconnect)');
  110. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'connect:function(a){', 'connect:function(a){Singa.playerConnected(a);');
  111. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'sendSpectate:function(){', 'sendSpectate:function(){Singa.playerSpectated();');
  112. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'sendNick:function(a){', 'sendNick:function(a){Singa.updateNickname(a);');
  113. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'setTarget:function(a,b){', 'setTarget:function(a,b){if(Singa.stopMovement){a = $(\'#canvas\').width() / 29; b = $(\'#canvas\').height() / 29;}');
  114. _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);}');
  115. _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;');
  116. _0x99fbxf = replaceRegexFile(_0x99fbxf, /if\((\+\w\[\w>>3\])<1\.0\){/i, 'if($1 < Singa.zoomResetValue){');
  117. _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');
  118. _0x99fbxf = replaceRegexFile(_0x99fbxf, /(\w)(=\+\w\[\w>>3\]\*\+\w\()(.\d)(,\+\w\);)/i, '$1$2 (Singa.zoomSpeedValue||0.9) $4 Singa.zoomValue=$1;');
  119. _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');
  120. _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');
  121. eval(_0x99fbxf)
  122. };
  123. _0x99fbxe['send']()
  124. }
  125.  
  126. function MinimapBall(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe)
  127. {
  128. this['isDefault'] = _0x99fbx2;
  129. this['name'] = b;
  130. this['x'] = _0x99fbx5;
  131. this['y'] = _0x99fbx6;
  132. this['lastX'] = _0x99fbx5;
  133. this['lastY'] = _0x99fbx6;
  134. this['color'] = _0x99fbx7;
  135. this['visible'] = _0x99fbxe
  136. }
  137.  
  138. function drawMinimap()
  139. {
  140. 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'])
  141. {
  142. minimapCtx['globalAlpha'] = 0.4;
  143. minimapCtx['fillStyle'] = '#1500FF';
  144. minimapCtx['fillRect'](0, 0, miniMap['width'], miniMap['height']);
  145. var _0x99fbx2 = 200 / Singa['mapSize'];
  146. var b = 200 / Singa['mapSize'];
  147. minimapCtx['globalAlpha'] = 1;
  148. for (ball in minimapBalls)
  149. {
  150. minimapBalls[ball]['draw'](minimapCtx, _0x99fbx2, b)
  151. }
  152. }
  153. }
  154.  
  155. function resetMinimap()
  156. {
  157. for (ball in minimapBalls)
  158. {
  159. if (!minimapBalls[ball]['isDefault'])
  160. {
  161. delete minimapBalls[ball]
  162. }
  163. }
  164. }
  165.  
  166. function addBallToMinimap(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe, _0x99fbx14)
  167. {
  168. minimapBalls[b] = new MinimapBall(_0x99fbx2, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe, _0x99fbx14)
  169. }
  170.  
  171. function removeBallFromMinimap(_0x99fbx2)
  172. {
  173. if (minimapBalls[_0x99fbx2])
  174. {
  175. delete minimapBalls[_0x99fbx2]
  176. }
  177. }
  178.  
  179. function moveBallOnMinimap(_0x99fbx2, b, _0x99fbx5)
  180. {
  181. if (minimapBalls[_0x99fbx2])
  182. {
  183. minimapBalls[_0x99fbx2]['x'] = b;
  184. minimapBalls[_0x99fbx2]['y'] = _0x99fbx5
  185. }
  186. }
  187.  
  188. function setBallVisible(_0x99fbx2, b)
  189. {
  190. if (minimapBalls[_0x99fbx2])
  191. {
  192. minimapBalls[_0x99fbx2]['visible'] = b
  193. }
  194. }
  195.  
  196. function changeNicknameOnBall(_0x99fbx2, b)
  197. {
  198. if (minimapBalls[_0x99fbx2])
  199. {
  200. minimapBalls[_0x99fbx2]['name'] = b
  201. }
  202. }
  203.  
  204. function replaceRegexFile(_0x99fbx2, b, _0x99fbx5)
  205. {
  206. var _0x99fbx6 = new RegExp(b);
  207. return _0x99fbx6['test'](_0x99fbx2) ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
  208. }
  209.  
  210. function replaceNormalFile(_0x99fbx2, b, _0x99fbx5)
  211. {
  212. return _0x99fbx2['indexOf'](b) != -1 ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
  213. }
  214.  
  215. function sendCommand(_0x99fbx2)
  216. {
  217. if (null != socket)
  218. {
  219. if (socket['connected'])
  220. {
  221. socket['emit']('command', _0x99fbx2)
  222. }
  223. }
  224. }
  225.  
  226. function connectToSingaServer()
  227. {
  228. socket = io['connect']('ws://rsagartoolz.tk:8001',
  229. {
  230. reconnection: true,
  231. query: 'key=' + client_uuid
  232. });
  233. socket['on']('command', function(_0x99fbx2)
  234. {
  235. if (void(0) === _0x99fbx2['name'])
  236. {
  237. return void(console)['log']('Recieved a command with no name.')
  238. };
  239. switch (_0x99fbx2['name'])
  240. {
  241. case 'force-update':
  242. resetMinimap();
  243. transmit_current_server(true);
  244. if (Singa['isAlive'])
  245. {
  246. sendCommand(
  247. {
  248. name: 'alive',
  249. playerName: Singa['playerName']
  250. })
  251. };
  252. break;
  253. case 'add':
  254. addBallToMinimap(false, _0x99fbx2['socketID'], _0x99fbx2['playerName'], _0x99fbx2['x'], _0x99fbx2['y'], '#1500FF', true);
  255. break;
  256. case 'remove':
  257. removeBallFromMinimap(_0x99fbx2['socketID']);
  258. break;
  259. case 'position':
  260. moveBallOnMinimap(_0x99fbx2['socketID'], _0x99fbx2['x'], _0x99fbx2['y']);
  261. break;
  262. case 'count':
  263. Singa['serverBots'] = _0x99fbx2['count'];
  264. break;
  265. case 'auth':
  266. Singa['isAuthorized'] = true;
  267. console['log']('Your client is authorized for use of more bots.');
  268. break;
  269. default:
  270. return void(console)['log']('Received a command with an unknown name: ' + _0x99fbx2['name'])
  271. }
  272. });
  273. socket['on']('bots', function(_0x99fbx2)
  274. {
  275. if ('server' == _0x99fbx2['name'])
  276. {
  277. Singa['remoteBotsServer'] = _0x99fbx2['server']
  278. };
  279. sendRemoteBotsMessage(_0x99fbx2)
  280. });
  281. socket['on']('disconnect', function()
  282. {
  283. resetMinimap();
  284. sendRemoteBotsMessage(
  285. {
  286. name: 'disconnect'
  287. })
  288. })
  289. }
  290.  
  291. function updateBotNames()
  292. {
  293. sendLocalBotsMessage(
  294. {
  295. name: 'names',
  296. botNames: Singa['botNames']
  297. });
  298. if (Singa['isAuthorized'])
  299. {
  300. sendCommand(
  301. {
  302. name: 'names',
  303. botNames: Singa['botNames']
  304. })
  305. }
  306. }
  307.  
  308. function validateNames(_0x99fbx2)
  309. {
  310. if (void(0) === _0x99fbx2)
  311. {
  312. return null
  313. };
  314. if (_0x99fbx2['indexOf'](',') > -1)
  315. {
  316. var b = _0x99fbx2['split'](',');
  317. for (name in b)
  318. {
  319. if (b[name]['length'] <= 0 || b[name]['length'] > 15)
  320. {
  321. return null
  322. }
  323. };
  324. return b
  325. };
  326. return _0x99fbx2['length'] > 0 && _0x99fbx2['length'] <= 15 ? [_0x99fbx2] : null
  327. }
  328.  
  329. function emitSplit()
  330. {
  331. if (Singa['isAuthorized'])
  332. {
  333. sendCommand(
  334. {
  335. name: 'split'
  336. })
  337. };
  338. sendLocalBotsMessage(
  339. {
  340. name: 'split'
  341. })
  342. }
  343.  
  344. function emitMassEject()
  345. {
  346. if (Singa['isAuthorized'])
  347. {
  348. sendCommand(
  349. {
  350. name: 'eject'
  351. })
  352. };
  353. sendLocalBotsMessage(
  354. {
  355. name: 'eject'
  356. })
  357. }
  358.  
  359. function emitLocalPosition()
  360. {
  361. var _0x99fbx2 = Singa['mouseX'];
  362. var b = Singa['mouseY'];
  363. if (!Singa['moveToMouse'])
  364. {
  365. _0x99fbx2 = Singa['playerX'];
  366. b = Singa['playerY']
  367. };
  368. sendLocalBotsMessage(
  369. {
  370. name: 'position',
  371. x: _0x99fbx2 + Singa['mapOffsetX'],
  372. y: b + Singa['mapOffsetY']
  373. })
  374. }
  375.  
  376. function emitPosition()
  377. {
  378. var _0x99fbx2 = Singa['mouseX'];
  379. var b = Singa['mouseY'];
  380. if (!Singa['moveToMouse'])
  381. {
  382. _0x99fbx2 = Singa['playerX'];
  383. b = Singa['playerY']
  384. };
  385. sendCommand(
  386. {
  387. name: 'position',
  388. x: Singa['realPlayerX'],
  389. y: Singa['realPlayerY'],
  390. botX: _0x99fbx2 + Singa['mapOffsetX'],
  391. botY: b + Singa['mapOffsetY']
  392. })
  393. }
  394.  
  395. function transmit_current_server(_0x99fbx2)
  396. {
  397. if (_0x99fbx2 || last_transmited_game_server != Singa['server'])
  398. {
  399. last_transmited_game_server = Singa['server'];
  400. sendCommand(
  401. {
  402. name: 'servers',
  403. server: last_transmited_game_server
  404. })
  405. }
  406. }
  407.  
  408. function generateBotFunction()
  409. {
  410. return function()
  411. {
  412. function replaceRegexFile(_0x99fbx2, b, _0x99fbx5)
  413. {
  414. var _0x99fbx6 = new RegExp(b);
  415. return _0x99fbx6['test'](_0x99fbx2) ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
  416. }
  417.  
  418. function replaceNormalFile(_0x99fbx2, b, _0x99fbx5)
  419. {
  420. return _0x99fbx2['indexOf'](b) != -1 ? _0x99fbx2 = _0x99fbx2['replace'](b, _0x99fbx5) : console['log']('[Failed] to replace: ' + b), _0x99fbx2
  421. }
  422.  
  423. function _0x99fbx25(_0x99fbx2, b)
  424. {
  425. return Math['floor'](Math['random']() * (b - _0x99fbx2 + 1)) + _0x99fbx2
  426. }
  427.  
  428. function _0x99fbx26()
  429. {
  430. var _0x99fbx7 = new XMLHttpRequest;
  431. _0x99fbx7['open']('GET', 'http://agar.io/agario.core.js', !0), _0x99fbx7['onload'] = function()
  432. {
  433. var _0x99fbxf = _0x99fbx7['responseText'];
  434. _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)
  435. }, _0x99fbx7['send'](null)
  436. }
  437. self['innerWidth'] = 1;
  438. self['innerHeight'] = 1;
  439. const _0x99fbx27 = {};
  440. elementMock = {
  441. getContext: function()
  442. {
  443. return {
  444. canvas:
  445. {
  446. width: 1,
  447. height: 1
  448. },
  449. clearRect: function() {},
  450. save: function() {},
  451. translate: function() {},
  452. scale: function() {},
  453. stroke: function() {},
  454. arc: function() {},
  455. fill: function() {},
  456. moveTo: function() {},
  457. lineTo: function() {},
  458. closePath: function() {},
  459. beginPath: function() {},
  460. restore: function() {},
  461. fillRect: function() {},
  462. measureText: function()
  463. {
  464. return {}
  465. },
  466. strokeText: function() {},
  467. fillText: function() {},
  468. drawImage: function() {}
  469. }
  470. },
  471. innerText: '',
  472. div:
  473. {
  474. appendChild: function() {}
  475. },
  476. appendChild: function() {},
  477. style:
  478. {}
  479. };
  480. document = {
  481. getElementById: function()
  482. {
  483. return elementMock
  484. },
  485. createElement: function(_0x99fbx2)
  486. {
  487. return elementMock
  488. },
  489. body:
  490. {
  491. firstChild:
  492. {},
  493. insertBefore: function() {}
  494. }
  495. };
  496. Image = function() {};
  497. self['Singa'] = {
  498. server: true,
  499. botID: 0,
  500. botName: 'EZBots',
  501. playerX: 0,
  502. playerY: 0,
  503. newX: 0,
  504. newY: 0,
  505. realPlayerX: null,
  506. realPlayerY: null,
  507. mapOffset: 7071,
  508. mapOffsetX: 0,
  509. mapOffsetY: 0,
  510. mapOffsetFixed: false,
  511. collectPellets: false,
  512. pelletTargetX: 99999,
  513. pelletTargetY: 99999,
  514. pellets: [],
  515. recordPellet: function(_0x99fbx2, b, _0x99fbx5)
  516. {
  517. this['pellets']['push'](
  518. {
  519. x: _0x99fbx2,
  520. y: b,
  521. size: _0x99fbx5
  522. })
  523. },
  524. setMapCoords: function(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe)
  525. {
  526. if (_0x99fbxe - _0x99fbx7 == 24)
  527. {
  528. if (_0x99fbx5 - _0x99fbx2 > 14E3)
  529. {
  530. if (_0x99fbx6 - b > 14E3)
  531. {
  532. this['mapOffsetX'] = this['mapOffset'] - _0x99fbx5;
  533. this['mapOffsetY'] = this['mapOffset'] - _0x99fbx6;
  534. this['mapOffsetFixed'] = true
  535. }
  536. }
  537. }
  538. },
  539. playerDied: function()
  540. {
  541. postMessage(
  542. {
  543. name: 'remove',
  544. botID: Singa['botID']
  545. })
  546. },
  547. playerSpawned: function()
  548. {
  549. postMessage(
  550. {
  551. name: 'add',
  552. botID: Singa['botID'],
  553. botName: Singa['botName'],
  554. x: Singa['realPlayerX'],
  555. y: Singa['realPlayerY']
  556. })
  557. },
  558. playerDisconnected: function()
  559. {
  560. postMessage(
  561. {
  562. name: 'remove',
  563. botID: Singa['botID']
  564. });
  565. if (self['core'])
  566. {
  567. if (null != Singa['server'])
  568. {
  569. core['connect'](Singa['server'])
  570. }
  571. }
  572. },
  573. reloadCore: function()
  574. {
  575. if (self['core'])
  576. {
  577. self['core']['destroy']()
  578. };
  579. _0x99fbx26()
  580. },
  581. onAgarioCoreLoaded: function()
  582. {
  583. self['core'] && null != Singa['server'] && core['connect'](Singa['server']);
  584. var _0x99fbx28 = Singa['fbToken'];
  585. console['log'](_0x99fbx28);
  586. 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];
  587. console['log'](_0x99fbx29);
  588. for (var _0x99fbx2a = 0; _0x99fbx2a < _0x99fbx28['length']; _0x99fbx2a++)
  589. {
  590. _0x99fbx29['push'](_0x99fbx28['charCodeAt'](_0x99fbx2a))
  591. };
  592. setTimeout(function()
  593. {
  594. _0x99fbx27['core']['proxyMobileData'](new Uint8Array(_0x99fbx29))
  595. }, 1000)
  596. },
  597. setPath: function()
  598. {
  599. var _0x99fbx2 = -1;
  600. var b = 0;
  601. var _0x99fbx5 = 0;
  602. for (; _0x99fbx5 < this['pellets']['length']; _0x99fbx5++)
  603. {
  604. var _0x99fbx6 = this['getDistanceBetweenPositions'](this['pellets'][_0x99fbx5]['x'], this['pellets'][_0x99fbx5]['y'], this['playerX'], this['playerY']);
  605. if (!(_0x99fbx2 != -1 && _0x99fbx6 > b))
  606. {
  607. _0x99fbx2 = _0x99fbx5;
  608. b = _0x99fbx6
  609. }
  610. };
  611. if (_0x99fbx2 == -1)
  612. {
  613. this['pelletTargetX'] = 99999;
  614. this['pelletTargetY'] = 99999
  615. }
  616. else
  617. {
  618. this['pelletTargetX'] = this['pellets'][_0x99fbx2]['x'];
  619. this['pelletTargetY'] = this['pellets'][_0x99fbx2]['y']
  620. };
  621. this['pellets'] = []
  622. },
  623. getDistanceBetweenPositions: function(_0x99fbx2, b, _0x99fbx5, _0x99fbx6)
  624. {
  625. return Math['sqrt'](Math['pow'](_0x99fbx5 - _0x99fbx2, 2) + Math['pow'](b - _0x99fbx6, 2))
  626. }
  627. };
  628. onmessage = function(_0x99fbx2)
  629. {
  630. var b = _0x99fbx2['data'];
  631. switch (b['name'])
  632. {
  633. case 'botID':
  634. Singa['botID'] = b['botID'];
  635. break;
  636. case 'server':
  637. Singa['server'] = b['server'];
  638. if (self['core'])
  639. {
  640. if (null != b['server'])
  641. {
  642. core['connect'](b['server'])
  643. }
  644. };
  645. break;
  646. case 'position':
  647. if (Singa['collectPellets'] && (99999 != Singa['pelletTargetX'] && 99999 != Singa['pelletTargetY']))
  648. {
  649. Singa['newX'] = Singa['pelletTargetX'];
  650. Singa['newY'] = Singa['pelletTargetY']
  651. }
  652. else
  653. {
  654. Singa['newX'] = b['x'] - Singa['mapOffsetX'];
  655. Singa['newY'] = b['y'] - Singa['mapOffsetY']
  656. };
  657. break;
  658. case 'split':
  659. if (self['core'])
  660. {
  661. core['split']()
  662. };
  663. break;
  664. case 'eject':
  665. if (self['core'])
  666. {
  667. core['eject']()
  668. };
  669. break;
  670. case 'names':
  671. if (null == b['botNames'])
  672. {
  673. Singa['botName'] = 'EZbots';
  674. break
  675. };
  676. Singa['botName'] = b['botNames'][_0x99fbx25(0, b['botNames']['length'] - 1)];
  677. break;
  678. case 'disconnect':
  679. Singa['server'] = null;
  680. if (self['core'])
  681. {
  682. core['disconnect']()
  683. };
  684. break;
  685. case 'collectPellets':
  686. Singa['collectPellets'] = b['collectPellets'];
  687. break;
  688. case 'fb':
  689. Singa['fbToken'] = b['token'];
  690. console['log'](b['token']);
  691. default:
  692. console['log']('Unknown message received.')
  693. }
  694. };
  695. setInterval(function()
  696. {
  697. Singa['realPlayerX'] = Singa['mapOffsetX'] + Singa['playerX'];
  698. Singa['realPlayerY'] = Singa['mapOffsetY'] + Singa['playerY'];
  699. postMessage(
  700. {
  701. botID: Singa['botID'],
  702. name: 'position',
  703. x: Singa['realPlayerX'],
  704. y: Singa['realPlayerY']
  705. });
  706. if (self['core'])
  707. {
  708. core['sendNick'](Singa['botName'])
  709. }
  710. }, 100);
  711. _0x99fbx26()
  712. }.toString()
  713. }
  714. window['history']['replaceState']('', '', '/' + location['hash']), window['getTextWidth'] = function(_0x99fbx2, b)
  715. {
  716. var _0x99fbx5 = getTextWidth['canvas'] || (getTextWidth['canvas'] = document['createElement']('canvas'));
  717. var _0x99fbx6 = _0x99fbx5['getContext']('2d');
  718. _0x99fbx6['font'] = b;
  719. var _0x99fbx7 = _0x99fbx6['measureText'](_0x99fbx2);
  720. return _0x99fbx7['width']
  721. };
  722. var entityMap = {
  723. "\x26": '&amp;',
  724. "\x3C": '&lt;',
  725. "\x3E": '&gt;',
  726. "\x22": '&quot;',
  727. "\x27": '&#39;',
  728. "\x2F": '&#x2F;'
  729. };
  730. var client_uuid = escapeHtml(localStorage['getItem']('ncEpHnKnIcWIFUmJyPxDBQMay0DOkM'));
  731. if (null === client_uuid || 15 != client_uuid['length'])
  732. {
  733. client_uuid = 'ncEpHnKnIcWIFUmJyPxDBQMay0DOkM';
  734. var ranStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  735. var ii = 0;
  736. for (; ii < 15; ii++)
  737. {
  738. client_uuid += ranStr['charAt'](Math['floor'](Math['random']() * ranStr['length']))
  739. };
  740. localStorage['setItem']('ncEpHnKnIcWIFUmJyPxDBQMay0DOkM', client_uuid)
  741. };
  742. window['Singa'] = {
  743. server: null,
  744. playerName: '',
  745. startBotAmount: 30,
  746. playerX: 0,
  747. playerY: 0,
  748. mouseX: 0,
  749. mouseY: 0,
  750. realPlayerX: null,
  751. realPlayerY: null,
  752. mapSize: 14142,
  753. mapOffset: 7071,
  754. mapOffsetX: 0,
  755. mapOffsetY: 0,
  756. mapOffsetFixed: false,
  757. zoomValue: 1,
  758. zoomResetValue: 0,
  759. zoomSpeedValue: 0.9,
  760. autoZoom: true,
  761. stopMovement: false,
  762. isAlive: true,
  763. moveToMouse: true,
  764. localBots:
  765. {},
  766. localBotsAlive:
  767. {},
  768. remoteBotsServer: 7,
  769. remoteBots:
  770. {},
  771. remoteBotsAlive:
  772. {},
  773. leaderboardData: '',
  774. serverBots: 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999,
  775. isAuthorized: true,
  776. drawMinimap: true,
  777. setMapCoords: function(_0x99fbx2, b, _0x99fbx5, _0x99fbx6, _0x99fbx7, _0x99fbxe)
  778. {
  779. if (_0x99fbxe - _0x99fbx7 == 24)
  780. {
  781. if (_0x99fbx5 - _0x99fbx2 > 14E3)
  782. {
  783. if (_0x99fbx6 - b > 14E3)
  784. {
  785. this['mapOffsetX'] = this['mapOffset'] - _0x99fbx5;
  786. this['mapOffsetY'] = this['mapOffset'] - _0x99fbx6;
  787. this['mapOffsetFixed'] = true
  788. }
  789. }
  790. }
  791. },
  792. playerDied: function()
  793. {
  794. Singa['isAlive'] = false;
  795. moveBallOnMinimap('player_death', this['realPlayerX'], this['realPlayerY']);
  796. setBallVisible('player_pointer', false);
  797. setBallVisible('player_death', true);
  798. sendCommand(
  799. {
  800. name: 'dead'
  801. })
  802. },
  803. playerSpawned: function()
  804. {
  805. Singa['isAlive'] = true;
  806. changeNicknameOnBall('player_pointer', Singa['playerName']);
  807. setBallVisible('player_spectate', false);
  808. setBallVisible('player_pointer', true);
  809. sendCommand(
  810. {
  811. name: 'alive',
  812. playerName: Singa['playerName']
  813. })
  814. },
  815. playerConnected: function(_0x99fbx2)
  816. {
  817. resetMinimap();
  818. if (null != this['remoteBotsServer'])
  819. {
  820. if (this['remoteBotsServer'] == _0x99fbx2)
  821. {
  822. sendRemoteBotsMessage(
  823. {
  824. name: 'disconnect'
  825. })
  826. }
  827. };
  828. Singa['server'] = _0x99fbx2;
  829. console['log']('Connecting to: ' + _0x99fbx2);
  830. setBallVisible('player_pointer', false);
  831. setBallVisible('player_death', false);
  832. setBallVisible('player_spectate', false);
  833. sendLocalBotsMessage(
  834. {
  835. name: 'server',
  836. server: _0x99fbx2
  837. })
  838. },
  839. playerDisconnected: function()
  840. {
  841. resetMinimap();
  842. sendCommand(
  843. {
  844. name: 'dead'
  845. });
  846. setBallVisible('player_pointer', false);
  847. setBallVisible('player_death', false);
  848. setBallVisible('player_spectate', false);
  849. Singa['server'] = null;
  850. Singa['isAlive'] = false
  851. },
  852. playerSpectated: function()
  853. {
  854. setBallVisible('player_pointer', false);
  855. setBallVisible('player_spectate', true);
  856. sendCommand(
  857. {
  858. name: 'dead'
  859. })
  860. },
  861. updateNickname: function(_0x99fbx2)
  862. {
  863. this['playerName'] = _0x99fbx2
  864. },
  865. loadCore: function()
  866. {
  867. setTimeout(function()
  868. {
  869. startLocalBots();
  870. startRemoteBots()
  871. }, 2E3);
  872. console['log']('Loading core.');
  873. var _0x99fbx2f = (document['getElementById']('canvas'), localStorage['getItem']('botnames'));
  874. if (null !== _0x99fbx2f)
  875. {
  876. Singa['botNames'] = validateNames(_0x99fbx2f);
  877. if (null !== Singa['botNames'])
  878. {
  879. $('#botnames')['val'](_0x99fbx2f)
  880. };
  881. updateBotNames()
  882. };
  883. $('#botnames')['on']('input', function()
  884. {
  885. var _0x99fbx2 = $('#botnames')['val']();
  886. var b = validateNames(_0x99fbx2);
  887. Singa['botNames'] = b;
  888. updateBotNames();
  889. if (null !== b)
  890. {
  891. localStorage['setItem']('botnames', _0x99fbx2)
  892. }
  893. });
  894. $('#leaderboardcopy')['click'](function(_0x99fbx2)
  895. {
  896. var b = $('#leaderboard')[0];
  897. b['setSelectionRange'](0, b['value']['length']);
  898. b['select']();
  899. try
  900. {
  901. document['execCommand']('copy')
  902. }
  903. catch (a$$0)
  904. {
  905. console['log']('Failed to copy leaderboard.')
  906. }
  907. });
  908. $('#uuidcopy')['click'](function(_0x99fbx2)
  909. {
  910. var b = $('#uuid')[0];
  911. b['setSelectionRange'](0, b['value']['length']);
  912. b['select']();
  913. try
  914. {
  915. document['execCommand']('copy')
  916. }
  917. catch (a$$0)
  918. {
  919. console['log']('Failed to copy uuid.')
  920. }
  921. });
  922. var _0x99fbx5;
  923. var _0x99fbx6 = true;
  924. var _0x99fbx30 = true;
  925. $(document)['keydown'](function(_0x99fbx2)
  926. {
  927. switch (_0x99fbx2['which'])
  928. {
  929. case 65:
  930. Singa['moveToMouse'] = !Singa['moveToMouse'];
  931. if (Singa['moveToMouse'])
  932. {
  933. $('#ismoveToMouse')['html']('<font color=\'#7FFF00\'>On</font>')
  934. }
  935. else
  936. {
  937. $('#ismoveToMouse')['html']('<font color=\'green\'>Off</font>')
  938. };
  939. break;
  940. case 68:
  941. Singa['stopMovement'] = !Singa['stopMovement'];
  942. if (Singa['stopMovement'])
  943. {
  944. $('#isStopMove')['html']('<font color=\'#7FFF00\'>On</font>')
  945. }
  946. else
  947. {
  948. $('#isStopMove')['html']('<font color=\'green\'>Off</font>')
  949. };
  950. break;
  951. case 69:
  952. emitSplit();
  953. break;
  954. case 82:
  955. emitMassEject();
  956. break;
  957. case 77:
  958. Singa['drawMinimap'] = !Singa['drawMinimap'];
  959. if (Singa['drawMinimap'])
  960. {
  961. $('#botcanvas')['show']()
  962. }
  963. else
  964. {
  965. $('#botcanvas')['hide']()
  966. };
  967. break;
  968. case 80:
  969. _0x99fbx30 = !_0x99fbx30;
  970. if (_0x99fbx30)
  971. {
  972. $('#collectPellets')['html']('<font color=\'#CBFF44\'>On</font>')
  973. }
  974. else
  975. {
  976. $('#collectPellets')['html']('<font color=\'green\'>Off</font>')
  977. };
  978. sendLocalBotsMessage(
  979. {
  980. name: 'collectPellets',
  981. collectPellets: _0x99fbx30
  982. });
  983. if (Singa['isAuthorized'])
  984. {
  985. sendCommand(
  986. {
  987. name: 'collectPellets',
  988. collectPellets: _0x99fbx30
  989. })
  990. };
  991. break;
  992. case 87:
  993. if (_0x99fbx6)
  994. {
  995. return
  996. };
  997. _0x99fbx6 = true;
  998. _0x99fbx5 = setInterval(function()
  999. {
  1000. core['eject']()
  1001. }, 50)
  1002. }
  1003. });
  1004. $(document)['keyup'](function(_0x99fbx2)
  1005. {
  1006. switch (_0x99fbx2['which'])
  1007. {
  1008. case 87:
  1009. _0x99fbx6 = false;
  1010. clearInterval(_0x99fbx5);
  1011. break;
  1012. case 84:
  1013. var b = 0;
  1014. var _0x99fbx7 = setInterval(function()
  1015. {
  1016. return b > 7 ? void(clearInterval)(_0x99fbx7) : (b++, void(core)['split']())
  1017. }, 50);
  1018. break;
  1019. case 81:
  1020. var _0x99fbxe = 0;
  1021. var _0x99fbx14 = setInterval(function()
  1022. {
  1023. return _0x99fbxe > 1 ? void(clearInterval)(_0x99fbx14) : (_0x99fbxe++, void(core)['split']())
  1024. }, 50)
  1025. }
  1026. });
  1027. addBallToMinimap(true, 'player_pointer', Singa['playerName'], Singa['realPlayerX'], Singa['realPlayerY'], '#158B00', false);
  1028. addBallToMinimap(true, 'player_death', 'Last Death', Singa['realPlayerX'], Singa['realPlayerY'], '#E50000', false);
  1029. addBallToMinimap(true, 'player_spectate', 'Spectate', Singa['realPlayerX'], Singa['realPlayerY'], '#FFFFFF', false);
  1030. connectToSingaServer();
  1031. insertCore();
  1032. setInterval(function()
  1033. {
  1034. MC['singaFreeCoins']()
  1035. }, 5E3);
  1036. setInterval(function()
  1037. {
  1038. drawMinimap()
  1039. }, 33)
  1040. },
  1041. reloadCore: function()
  1042. {
  1043. console['log']('Reloading Core.');
  1044. insertCore()
  1045. },
  1046. onAgarioCoreLoaded: function()
  1047. {
  1048. window['skinHack'] = new skinHack();
  1049. console['log']('Loading settings into agario core.');
  1050. core['setSkins'](!$('#noSkins')['is'](':checked'));
  1051. core['setNames'](!$('#noNames')['is'](':checked'));
  1052. core['setColors'](!$('#noColors')['is'](':checked'));
  1053. core['setShowMass']($('#showMass')['is'](':checked'));
  1054. core['setDarkTheme']($('#darkTheme')['is'](':checked'))
  1055. }
  1056. };
  1057. var tempLeaderBoard = '';
  1058. var tempLeaderBoardIndex = 1;
  1059. CanvasRenderingContext2D['prototype']['_fillText'] = CanvasRenderingContext2D['prototype']['fillText'], CanvasRenderingContext2D['prototype']['fillText'] = function()
  1060. {
  1061. this['_fillText']['apply'](this, arguments);
  1062. if ('27' === arguments[0])
  1063. {
  1064. if ('' != tempLeaderBoard)
  1065. {
  1066. Singa['leaderboardData'] = tempLeaderBoard;
  1067. $('#leaderboard')['val'](Singa['leaderboardData'])
  1068. };
  1069. tempLeaderBoardIndex = 1;
  1070. tempLeaderBoard = ''
  1071. }
  1072. else
  1073. {
  1074. if (':teams' != $('#gamemode')['val']() && (0 == arguments[0]['indexOf'](tempLeaderBoardIndex + '.') && tempLeaderBoardIndex < 11))
  1075. {
  1076. tempLeaderBoard += arguments[0] + (tempLeaderBoardIndex <= 9 ? ', ' : '');
  1077. tempLeaderBoardIndex++
  1078. }
  1079. else
  1080. {
  1081. this['_fillText']['apply'](this, arguments)
  1082. }
  1083. }
  1084. }, CanvasRenderingContext2D['prototype']['_drawImage'] = CanvasRenderingContext2D['prototype']['drawImage'], CanvasRenderingContext2D['prototype']['drawImage'] = function()
  1085. {
  1086. if (arguments[0]['src'])
  1087. {
  1088. if ('http://agar.io/img/background.png' == arguments[0]['src'])
  1089. {
  1090. arguments[0]['src'] = ''
  1091. }
  1092. };
  1093. this['_drawImage']['apply'](this, arguments)
  1094. };
  1095. var miniMap = null;
  1096. var minimapCtx = null;
  1097. minimapBalls = {}, MinimapBall['prototype'] = {
  1098. draw: function(_0x99fbx2, b, _0x99fbx5)
  1099. {
  1100. if (this['visible'])
  1101. {
  1102. this['lastX'] = (29 * this['lastX'] + this['x']) / 30;
  1103. this['lastY'] = (29 * this['lastY'] + this['y']) / 30;
  1104. var _0x99fbx6 = ((this['isDefault'] ? this['x'] : this['lastX']) + Singa['mapOffset']) * b;
  1105. var _0x99fbx7 = ((this['isDefault'] ? this['y'] : this['lastY']) + Singa['mapOffset']) * _0x99fbx5;
  1106. _0x99fbx2['fillStyle'] = this['color'];
  1107. _0x99fbx2['font'] = '10px Ubuntu';
  1108. _0x99fbx2['textAlign'] = 'center';
  1109. _0x99fbx2['fillText']('' == this['name'] ? 'EZBots' : this['name'], _0x99fbx6, _0x99fbx7 - 10);
  1110. _0x99fbx2['beginPath']();
  1111. _0x99fbx2['arc'](_0x99fbx6, _0x99fbx7, 4.5, 0, 2 * Math['PI'], false);
  1112. _0x99fbx2['closePath']();
  1113. _0x99fbx2['fillStyle'] = this['color'];
  1114. _0x99fbx2['fill']()
  1115. }
  1116. }
  1117. };
  1118. var b = new XMLHttpRequest;
  1119. b['open']('GET', '/mc/agario.js', true), b['onload'] = function()
  1120. {
  1121. var _0x99fbxf = b['responseText'];
  1122. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'if(js.keyCode==32&&i1!="nick"){js.preventDefault()}', '');
  1123. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'showAds:function(i){if', 'showAds:function(i){},showFuck:function(i){if');
  1124. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'showPromoBadge:function(', 'showPromoBadge:function(i){},fuckbacks: function(');
  1125. _0x99fbxf = replaceRegexFile(_0x99fbxf, /(return\s\w+.tab.toUpperCase\(\)).indexOf\(\w+.toUpperCase\(\)\)!=-1/, '$1 != \'VETERAN\'');
  1126. _0x99fbxf = replaceRegexFile(_0x99fbxf, /if\(\w+.shouldSkipConfigEntry\(\w+.productIdToQuantify.*visibility\)\)\{continue\}/, '');
  1127. _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")');
  1128. _0x99fbxf = replaceRegexFile(_0x99fbxf, /var\si2=window.document.createElement..script..+head.appendChild.i2../i, 'Singa.reloadCore();');
  1129. _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;},');
  1130. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'onPlayerBanned:function(i)', 'onPlayerBanned: function(i){},shitfacefuck:function(i)');
  1131. _0x99fbxf = replaceNormalFile(_0x99fbxf, 'setPopupActiveState:function(i){', 'setPopupActiveState:function(i){console.log(\'stopped annoying ad\');return;');
  1132. eval(_0x99fbxf);
  1133. var _0x99fbx7 = new XMLHttpRequest;
  1134. _0x99fbx7['open']('GET', '/', true);
  1135. _0x99fbx7['onload'] = function()
  1136. {
  1137. var _0x99fbx2 = _0x99fbx7['responseText'];
  1138. _0x99fbx2 = replaceNormalFile(_0x99fbx2, 'kjYztklZX7lNboE', 'kjYztklZX7lNboE');
  1139. _0x99fbx2 = replaceRegexFile(_0x99fbx2, /<footer[\S\s]*\/footer>/i, '');
  1140. _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>');
  1141. _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<body>', '<body onload="Singa.loadCore()">');
  1142. _0x99fbx2 = replaceRegexFile(_0x99fbx2, /<script type="text\/javascript" src="mc\/agario\.js.*"><\/script>/i, '');
  1143. _0x99fbx2 = replaceRegexFile(_0x99fbx2, /<div id="adsBottom".*display:block;">/i, '<div id="adsBottom" style="display:none">');
  1144. _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<div class="diep-cross" style="', '<div class="diep-cross" style="display:none;');
  1145. _0x99fbx2 = replaceNormalFile(_0x99fbx2, '<div id="promo-badge-container">', '<div id="promo-badge-container" style="display:none;">');
  1146. _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>');
  1147. _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>');
  1148. _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>');
  1149. document['open']();
  1150. document['write'](_0x99fbx2);
  1151. document['close']()
  1152. };
  1153. _0x99fbx7['send']()
  1154. }, b['send'](), setInterval(function()
  1155. {
  1156. Singa['realPlayerX'] = Singa['mapOffsetX'] + Singa['playerX'];
  1157. Singa['realPlayerY'] = Singa['mapOffsetY'] + Singa['playerY'];
  1158. moveBallOnMinimap('player_pointer', Singa['realPlayerX'], Singa['realPlayerY']);
  1159. moveBallOnMinimap('player_spectate', Singa['realPlayerX'], Singa['realPlayerY'])
  1160. }, 50);
  1161. var last_transmited_game_server = null;
  1162. var socket = null;
  1163. setInterval(function()
  1164. {
  1165. if (!Singa['isAuthorized'])
  1166. {
  1167. emitPosition()
  1168. }
  1169. }, 10), setInterval(function()
  1170. {
  1171. if (Singa['isAuthorized'])
  1172. {
  1173. emitPosition()
  1174. };
  1175. emitLocalPosition();
  1176. transmit_current_server(false)
  1177. }, 10);
  1178. window['interval'] = setInterval(function()
  1179. {
  1180. if (MC['coreWasLoaded'] == true && $('#nick')[0])
  1181. {
  1182. clearInterval(interval);
  1183. $('#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>');
  1184. $('#agarTwitter')['remove']();
  1185. $('#agarfacebook')['remove']();
  1186. $('h2')['replaceWith']('<h1>EZBots</h1>')
  1187. }
  1188. }, 100);
  1189.  
  1190. function skinHack()
  1191. {
  1192. this['currentSkin'] = '';
  1193. this['configUrlBase'] = window['EnvConfig']['config_url'] + '/' + localStorage['getItem']('last_config_id') + '/';
  1194. this['configUrl'] = this['configUrlBase'] + 'GameConfiguration.json';
  1195. this['skinObj'] = {};
  1196. this['rotateInterval'] = 1000;
  1197. this['playerName'] = '';
  1198. this['canUseScript'] = false;
  1199. this['downloadConfig']()
  1200. }
  1201. skinHack['prototype'] = {
  1202. downloadConfig: function()
  1203. {
  1204. var _0x99fbx38 = this['onDownload']['bind'](this);
  1205. $['ajax'](
  1206. {
  1207. type: 'GET',
  1208. url: this['configUrl'],
  1209. success: function(_0x99fbx39)
  1210. {
  1211. _0x99fbx38(_0x99fbx39)
  1212. },
  1213. error: function(_0x99fbx3a, _0x99fbx3b, _0x99fbx3c) {}
  1214. })
  1215. },
  1216. onDownload: function(_0x99fbx39)
  1217. {
  1218. this['handleSkinData'](_0x99fbx39);
  1219. this['injectHtml']();
  1220. this['overrideSetNick']();
  1221. this['initSkinRotation']();
  1222. this['updateSkin']()
  1223. },
  1224. handleSkinData: function(_0x99fbx39)
  1225. {
  1226. var _0x99fbx3d = _0x99fbx39['gameConfig']['Shop - Skins'];
  1227. var _0x99fbx3e = _0x99fbx39['gameConfig']['Gameplay - Equippable Skins'];
  1228. for (var _0x99fbx2a = 0; _0x99fbx2a < _0x99fbx3e['length']; _0x99fbx2a++)
  1229. {
  1230. var _0x99fbx3f = _0x99fbx3e[_0x99fbx2a];
  1231. this['skinObj'][_0x99fbx3f['productId']] = {
  1232. image: _0x99fbx3f['image'],
  1233. color: _0x99fbx3f['cellColor']
  1234. }
  1235. };
  1236. for (var _0x99fbx2a = 0; _0x99fbx2a < _0x99fbx3d['length']; _0x99fbx2a++)
  1237. {
  1238. var _0x99fbx3f = _0x99fbx3d[_0x99fbx2a];
  1239. this['skinObj'][_0x99fbx3f['productIdToQuantify']]['title'] = _0x99fbx3f['title']
  1240. }
  1241. },
  1242. injectHtml: function()
  1243. {
  1244. $('#advertisement')['hide']();
  1245. $('.agario-promo')['remove']();
  1246. $('.diep-cross')['remove']();
  1247. $('#agario-web-incentive')['remove']();
  1248. $('<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');
  1249. this['addSkinOption'](
  1250. {
  1251. image: '',
  1252. color: '0x00000000',
  1253. title: 'Default Skin'
  1254. });
  1255. for (var _0x99fbx40 in this['skinObj'])
  1256. {
  1257. if (this['skinObj']['hasOwnProperty'](_0x99fbx40) && this['skinObj'][_0x99fbx40]['title'])
  1258. {
  1259. this['addSkinOption'](this['skinObj'][_0x99fbx40])
  1260. }
  1261. };
  1262. $('.btn-toggle')['click'](function()
  1263. {
  1264. $(this)['find']('.btn')['toggleClass']('active');
  1265. if ($(this)['find']('.btn-primary')['size']() > 0)
  1266. {
  1267. $(this)['find']('.btn')['toggleClass']('btn-primary')
  1268. };
  1269. if ($(this)['find']('.btn-info')['size']() > 0)
  1270. {
  1271. $(this)['find']('.btn')['toggleClass']('btn-info')
  1272. };
  1273. $(this)['find']('.btn')['toggleClass']('btn-default')
  1274. });
  1275. this['preLoadSkins']();
  1276. $('#openfl-content')['click'](this['updateSkin']['bind'](this))
  1277. },
  1278. preLoadSkins: function()
  1279. {
  1280. for (var _0x99fbx41 in this['skinObj'])
  1281. {
  1282. if (this['skinObj']['hasOwnProperty'](_0x99fbx41))
  1283. {
  1284. (new Image())['src'] = this['configUrlBase'] + this['skinObj'][_0x99fbx41]['image']
  1285. }
  1286. }
  1287. },
  1288. addSkinOption: function(_0x99fbx3f)
  1289. {
  1290. _0x99fbx3f['title'] = _0x99fbx3f['title']['split']('product_name_skin_')[1];
  1291. $('#skinsList')['append']('<option value="' + _0x99fbx3f['image'] + ':' + _0x99fbx3f['color'] + '">' + _0x99fbx3f['title'] + '</option>')
  1292. },
  1293. overrideSetNick: function()
  1294. {
  1295. window['MC']['_setNick'] = window['MC']['setNick'];
  1296. window['MC']['setNick'] = function()
  1297. {
  1298. var _0x99fbx42 = arguments[0];
  1299. if (_0x99fbx42 === '')
  1300. {
  1301. this['playerName'] = 'EZBots';
  1302. _0x99fbx42 = 'EZBots';
  1303. console['log']('Overriding')
  1304. }
  1305. else
  1306. {
  1307. this['playerName'] = _0x99fbx42
  1308. };
  1309. window['MC']._setNick(_0x99fbx42);
  1310. this['updateSkin']()
  1311. }['bind'](this)
  1312. },
  1313. checkSubscription: function()
  1314. {
  1315. try
  1316. {
  1317. if (localStorage['getItem']('canUseScript'))
  1318. {
  1319. this['canUseScript'] = JSON['parse'](localStorage['getItem']('canUseScript')['toLowerCase']())
  1320. }
  1321. else
  1322. {
  1323. localStorage['setItem']('canUseScript', 'false');
  1324. return this['promptSubscription']()
  1325. };
  1326. if (!this['canUseScript'])
  1327. {
  1328. return this['promptSubscription']()
  1329. };
  1330. return this['canUseScript']
  1331. }
  1332. catch (err)
  1333. {
  1334. console['log'](err)
  1335. }
  1336. },
  1337. promptSubscription: function()
  1338. {
  1339. var _0x99fbx43 = window['confirm']('You must subscribe to NexuzPlays to <strong>use</strong> this Script');
  1340. if (_0x99fbx43)
  1341. {
  1342. var _0x99fbx44 = window['open']('https://www.youtube.com/channel/UClVnhew8toDIjY4Ew90inOg', '_blank');
  1343. if (_0x99fbx44)
  1344. {
  1345. localStorage['setItem']('canUseScript', 'true');
  1346. this['canUseScript'] = true;
  1347. this['updateSkin']()
  1348. }
  1349. else
  1350. {
  1351. alert('Please allow VPN and refresh the page first!')
  1352. }
  1353. };
  1354. return this['canUseScript']()
  1355. },
  1356. updateSkin: function()
  1357. {
  1358. var _0x99fbx45 = $('#skinsList')['val']()['split'](':');
  1359. var _0x99fbx46 = _0x99fbx45[0]['length'] > 0;
  1360. var _0x99fbx47 = _0x99fbx46 ? this['configUrlBase'] + _0x99fbx45[0] : document['getElementsByClassName']('circle bordered')[0]['src'];
  1361. 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);
  1362. var _0x99fbx42 = this['playerName'];
  1363. window['core']['registerSkin'](_0x99fbx42, null, _0x99fbx47, _0x99fbx47 ? 2 : 0, _0x99fbx47 ? _0x99fbx48 : null);
  1364. $('#skinPreview')['attr']('src', _0x99fbx47);
  1365. var _0x99fbx49 = ['top', 'right', 'bottom', 'left'];
  1366. for (var _0x99fbx2a = 0; _0x99fbx2a < array['length']; _0x99fbx2a++)
  1367. {
  1368. $('#skinPreview')['css']('border-' + array[_0x99fbx2a] + '-color', '#' + _0x99fbx48.toString(16))
  1369. }
  1370. },
  1371. rgbToHex: function(_0x99fbx48)
  1372. {
  1373. if (_0x99fbx48['substr'](0, 1) === '#')
  1374. {
  1375. return _0x99fbx48
  1376. };
  1377. var _0x99fbx4a = /(.*?)rgb\((\d+), (\d+), (\d+)\)/ ['exec'](_0x99fbx48);
  1378. var _0x99fbx4b = parseInt(_0x99fbx4a[2]);
  1379. var _0x99fbx4c = parseInt(_0x99fbx4a[3]);
  1380. var _0x99fbx4d = parseInt(_0x99fbx4a[4]);
  1381. var _0x99fbx4e = _0x99fbx4d | (_0x99fbx4c << 8) | (_0x99fbx4b << 16);
  1382. return _0x99fbx4a[1] + '#' + _0x99fbx4e.toString(16)
  1383. },
  1384. initSkinRotation: function()
  1385. {
  1386. setInterval(function()
  1387. {
  1388. if ($('.btn-toggle')['find']('.btn-primary')['html']() === 'ON')
  1389. {
  1390. $('#skinsList')[0]['selectedIndex'] = ($('#skinsList')[0]['selectedIndex'] + 1) % $('#skinsList')[0]['length'];
  1391. this['updateSkin']()
  1392. }
  1393. }['bind'](this), this['rotateInterval'])
  1394. }
  1395. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement