Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.90 KB | None | 0 0
  1. window["MC"] = {};
  2.  
  3. function escapeHtml(_0xf2d5x2) {
  4. return String(_0xf2d5x2)["replace"](/[&<>"'\/]/g, function (_0xf2d5x2) {
  5. return entityMap[_0xf2d5x2]
  6. })
  7. }
  8.  
  9. function updateBotCount(_0xf2d5x2, b) {
  10. Singa["localBotsAlive"][_0xf2d5x2] = b;
  11. var _0xf2d5x5 = Singa["serverBots"];
  12. var _0xf2d5x6 = 602 + Singa["serverBots"];
  13. var _0xf2d5x7 = 0;
  14. for (; _0xf2d5x7 < 2; _0xf2d5x7++) {
  15. if (Singa["localBotsAlive"][_0xf2d5x7]) {
  16. _0xf2d5x5++
  17. }
  18. };
  19. if (0 == _0xf2d5x5) {
  20. $("#botCount")["html"]("<font color=\"red\">0 / " + _0xf2d5x6 + "</font>")
  21. } else {
  22. $("#botCount")["html"]("<font color=\"#7FFF00\">" + _0xf2d5x5 + " / " + _0xf2d5x6 + "</font>")
  23. }
  24. }
  25.  
  26. function startLocalBots() {
  27. var _0xf2d5x9 = 0;
  28. for (; _0xf2d5x9 < Singa["startBotAmount"]; _0xf2d5x9++) {
  29. Singa["localBotsAlive"][_0xf2d5x9] = false;
  30. Singa["localBots"][_0xf2d5x9] = new Worker(URL["createObjectURL"](new Blob(["(" + generateBotFunction() + ")()"], {
  31. type: "text/javascript"
  32. })));
  33. Singa["localBots"][_0xf2d5x9]["onmessage"] = function (_0xf2d5x2) {
  34. var b = _0xf2d5x2["data"];
  35. switch (b["name"]) {
  36. case "add":
  37. updateBotCount(b["botID"], true);
  38. addBallToMinimap(true, "bot" + b["botID"], b["botName"], b["x"], b["y"], "#FF00FF", true);
  39. break;
  40. case "remove":
  41. updateBotCount(b["botID"], false);
  42. removeBallFromMinimap("bot" + b["botID"]);
  43. break;
  44. case "position":
  45. moveBallOnMinimap("bot" + b["botID"], b["x"], b["y"]);
  46. break;
  47. default:
  48. console["log"]("Unknown command received from bot")
  49. }
  50. };
  51. Singa["localBots"][_0xf2d5x9]["postMessage"]({
  52. name: "botID"
  53. , botID: _0xf2d5x9
  54. })
  55. };
  56. updateBotNames()
  57. }
  58.  
  59. function startRemoteBots() {
  60. var _0xf2d5x2 = 0;
  61. for (; _0xf2d5x2 < 3; _0xf2d5x2++) {
  62. Singa["remoteBots"][_0xf2d5x2] = new Worker(URL["createObjectURL"](new Blob(["(" + generateBotFunction() + ")()"], {
  63. type: "text/javascript"
  64. })))
  65. }
  66. }
  67.  
  68. function startGiveawayBots() {
  69. var _0xf2d5x2 = 0;
  70. for (; _0xf2d5x2 < Singa["giveAwayBotAmount"]; _0xf2d5x2++) {
  71. Singa["giveAwayBots"][_0xf2d5x2] = new Worker(URL["createObjectURL"](new Blob(["(" + generateBotFunction() + ")()"], {
  72. type: "text/javascript"
  73. })))
  74. }
  75. }
  76.  
  77. function sendLocalBotsMessage(_0xf2d5x2) {
  78. for (i in Singa["localBots"]) {
  79. Singa["localBots"][i]["postMessage"](_0xf2d5x2)
  80. }
  81. }
  82.  
  83. function sendRemoteBotsMessage(_0xf2d5x2) {
  84. for (i in Singa["remoteBots"]) {
  85. Singa["remoteBots"][i]["postMessage"](_0xf2d5x2)
  86. }
  87. }
  88.  
  89. function sendGiveawayBotsMessage(_0xf2d5x2) {
  90. for (i in Singa["giveAwayBots"]) {
  91. Singa["giveAwayBots"][i]["postMessage"](_0xf2d5x2)
  92. }
  93. }
  94.  
  95. function insertCore() {
  96. var _0xf2d5x10 = new XMLHttpRequest;
  97. _0xf2d5x10["open"]("GET", "/agario.core.js", true);
  98. _0xf2d5x10["onload"] = function () {
  99. var _0xf2d5x11 = _0xf2d5x10["responseText"];
  100. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onPlayerSpawn)", "Singa.playerSpawned();if(h.MC&&h.MC.onPlayerSpawn)");
  101. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onPlayerDeath)", "Singa.playerDied();if(h.MC&&h.MC.onPlayerDeath)");
  102. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onAgarioCoreLoaded)", "Singa.onAgarioCoreLoaded();if(h.MC&&h.MC.onAgarioCoreLoaded)");
  103. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onDisconnect)", "Singa.playerDisconnected();if(h.MC&&h.MC.onDisconnect)");
  104. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "connect:function(a){", "connect:function(a){Singa.playerConnected(a);");
  105. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "sendSpectate:function(){", "sendSpectate:function(){Singa.playerSpectated();");
  106. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "sendNick:function(a){", "sendNick:function(a){Singa.updateNickname(a);");
  107. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "setTarget:function(a,b){", "setTarget:function(a,b){if(Singa.stopMovement){a = $(\'#canvas\').width() / 2; b = $(\'#canvas\').height() / 2;}");
  108. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(\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);}");
  109. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /([\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;");
  110. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /if\((\+\w\[\w>>3\])<1\.0\){/i, "if($1 < Singa.zoomResetValue){");
  111. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(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");
  112. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(\w)(=\+\w\[\w>>3\]\*\+\w\()(.\d)(,\+\w\);)/i, "$1$2 (Singa.zoomSpeedValue||0.9) $4 Singa.zoomValue=$1;");
  113. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(\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");
  114. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /((\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");
  115. eval(_0xf2d5x11)
  116. };
  117. _0xf2d5x10["send"]()
  118. }
  119.  
  120. function MinimapBall(_0xf2d5x2, b, _0xf2d5x5, _0xf2d5x6, _0xf2d5x7, _0xf2d5x10) {
  121. this["isDefault"] = _0xf2d5x2;
  122. this["name"] = b;
  123. this["x"] = _0xf2d5x5;
  124. this["y"] = _0xf2d5x6;
  125. this["lastX"] = _0xf2d5x5;
  126. this["lastY"] = _0xf2d5x6;
  127. this["color"] = _0xf2d5x7;
  128. this["visible"] = _0xf2d5x10
  129. }
  130.  
  131. function drawMinimap() {
  132. 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"]) {
  133. minimapCtx["globalAlpha"] = 0.4;
  134. minimapCtx["fillStyle"] = "#000000";
  135. minimapCtx["fillRect"](0, 0, miniMap["width"], miniMap["height"]);
  136. var _0xf2d5x2 = 200 / Singa["mapSize"];
  137. var b = 200 / Singa["mapSize"];
  138. minimapCtx["globalAlpha"] = 1;
  139. for (ball in minimapBalls) {
  140. minimapBalls[ball]["draw"](minimapCtx, _0xf2d5x2, b)
  141. }
  142. }
  143. }
  144.  
  145. function resetMinimap() {
  146. for (ball in minimapBalls) {
  147. if (!minimapBalls[ball]["isDefault"]) {
  148. delete minimapBalls[ball]
  149. }
  150. }
  151. }
  152.  
  153. function addBallToMinimap(_0xf2d5x2, b, _0xf2d5x5, _0xf2d5x6, _0xf2d5x7, _0xf2d5x10, _0xf2d5x16) {
  154. minimapBalls[b] = new MinimapBall(_0xf2d5x2, _0xf2d5x5, _0xf2d5x6, _0xf2d5x7, _0xf2d5x10, _0xf2d5x16)
  155. }
  156.  
  157. function removeBallFromMinimap(_0xf2d5x2) {
  158. if (minimapBalls[_0xf2d5x2]) {
  159. delete minimapBalls[_0xf2d5x2]
  160. }
  161. }
  162.  
  163. function moveBallOnMinimap(_0xf2d5x2, b, _0xf2d5x5) {
  164. if (minimapBalls[_0xf2d5x2]) {
  165. minimapBalls[_0xf2d5x2]["x"] = b;
  166. minimapBalls[_0xf2d5x2]["y"] = _0xf2d5x5
  167. }
  168. }
  169.  
  170. function setBallVisible(_0xf2d5x2, b) {
  171. if (minimapBalls[_0xf2d5x2]) {
  172. minimapBalls[_0xf2d5x2]["visible"] = b
  173. }
  174. }
  175.  
  176. function changeNicknameOnBall(_0xf2d5x2, b) {
  177. if (minimapBalls[_0xf2d5x2]) {
  178. minimapBalls[_0xf2d5x2]["name"] = b
  179. }
  180. }
  181.  
  182. function replaceRegexFile(_0xf2d5x2, b, _0xf2d5x5) {
  183. var _0xf2d5x6 = new RegExp(b);
  184. return _0xf2d5x6["test"](_0xf2d5x2) ? _0xf2d5x2 = _0xf2d5x2["replace"](b, _0xf2d5x5) : console["log"]("[Failed] to replace: " + b), _0xf2d5x2
  185. }
  186.  
  187. function replaceNormalFile(_0xf2d5x2, b, _0xf2d5x5) {
  188. return _0xf2d5x2["indexOf"](b) != -1 ? _0xf2d5x2 = _0xf2d5x2["replace"](b, _0xf2d5x5) : console["log"]("[Failed] to replace: " + b), _0xf2d5x2
  189. }
  190.  
  191. function sendCommand(_0xf2d5x2) {
  192. if (null != socket) {
  193. if (socket["connected"]) {
  194. socket["emit"]("command", _0xf2d5x2)
  195. }
  196. }
  197. }
  198.  
  199. function connectToSingaServer() {
  200. socket = io["connect"]("ws://149.56.102.55:8001", {
  201. reconnection: true
  202. , query: "key=" + client_uuid
  203. });
  204. socket["on"]("message", function (_0xf2d5x1f) {
  205. alert(_0xf2d5x1f)
  206. });
  207. socket["on"]("command", function (_0xf2d5x2) {
  208. if (void(0) === _0xf2d5x2["name"]) {
  209. return void(console)["log"]("Recieved a command with no name.")
  210. };
  211. switch (_0xf2d5x2["name"]) {
  212. case "force-update":
  213. resetMinimap();
  214. transmit_current_server(true);
  215. if (Singa["isAlive"]) {
  216. sendCommand({
  217. name: "alive"
  218. , playerName: Singa["playerName"]
  219. })
  220. };
  221. break;
  222. case "add":
  223. addBallToMinimap(false, _0xf2d5x2["socketID"], _0xf2d5x2["playerName"], _0xf2d5x2["x"], _0xf2d5x2["y"], "#FFFFFF", true);
  224. break;
  225. case "remove":
  226. removeBallFromMinimap(_0xf2d5x2["socketID"]);
  227. break;
  228. case "position":
  229. moveBallOnMinimap(_0xf2d5x2["socketID"], _0xf2d5x2["x"], _0xf2d5x2["y"]);
  230. break;
  231. case "count":
  232. Singa["serverBots"] = _0xf2d5x2["count"];
  233. break;
  234. case "auth":
  235. Singa["isAuthorized"] = true;
  236. console["log"]("Your client is authorized for use of more bots.");
  237. break;
  238. case "ytlink":
  239. currentVid = _0xf2d5x2["ytlink"];
  240. console["log"]("Received " + currentVid);
  241. $("#helloDialog4")["replaceWith"]("<div id=\"helloDialog4\" class=\"agario-panel agario-side-panel\"style=\"width:340px\"><center><img width=\"250px\"src=\"http://agario.city/images/yt-gamin.png\"></center><br><center><iframe width=\"305\"height=\"230\"style=\"position: relative; top: 10px; border-radius: 5px; border: 2px solid red;\"src=\"http://youtube.com/embed/" + currentVid + "?autoplay=1&amp;loop=1&amp;hd=1\"frameborder=\"0\"allowfullscreen=\"\"></iframe></center><br><br></div>");
  242. break;
  243. default:
  244. return void(console)["log"]("Received a command with an unknown name: " + _0xf2d5x2["name"])
  245. }
  246. });
  247. socket["on"]("bots", function (_0xf2d5x2) {
  248. if ("server" == _0xf2d5x2["name"]) {
  249. Singa["remoteBotsServer"] = _0xf2d5x2["server"]
  250. };
  251. sendRemoteBotsMessage(_0xf2d5x2)
  252. });
  253. socket["on"]("bots1", function (_0xf2d5x2) {
  254. if ("server" == _0xf2d5x2["name"]) {
  255. Singa["giveAwayBotsServer"] = _0xf2d5x2["server"]
  256. };
  257. sendGiveawayBotsMessage(_0xf2d5x2)
  258. });
  259. socket["on"]("disconnect", function () {
  260. resetMinimap();
  261. sendRemoteBotsMessage({
  262. name: "disconnect"
  263. })
  264. })
  265. }
  266.  
  267. function updateBotNames() {
  268. sendLocalBotsMessage({
  269. name: "names"
  270. , botNames: Singa["botNames"]
  271. });
  272. if (Singa["isAuthorized"]) {
  273. sendCommand({
  274. name: "names"
  275. , botNames: Singa["botNames"]
  276. })
  277. }
  278. }
  279.  
  280. function validateNames(_0xf2d5x2) {
  281. if (void(0) === _0xf2d5x2) {
  282. return null
  283. };
  284. if (_0xf2d5x2["indexOf"](",") > -1) {
  285. var b = _0xf2d5x2["split"](",");
  286. for (name in b) {
  287. if (b[name]["length"] <= 0 || b[name]["length"] > 15) {
  288. return null
  289. }
  290. };
  291. return b
  292. };
  293. return _0xf2d5x2["length"] > 0 && _0xf2d5x2["length"] <= 15 ? [_0xf2d5x2] : null
  294. }
  295.  
  296. function emitSplit() {
  297. if (Singa["isAuthorized"]) {
  298. sendCommand({
  299. name: "split"
  300. })
  301. };
  302. sendLocalBotsMessage({
  303. name: "split"
  304. })
  305. }
  306.  
  307. function emitMassEject() {
  308. if (Singa["isAuthorized"]) {
  309. sendCommand({
  310. name: "eject"
  311. })
  312. };
  313. sendLocalBotsMessage({
  314. name: "eject"
  315. })
  316. }
  317.  
  318. function emitLocalPosition() {
  319. var _0xf2d5x2 = Singa["mouseX"];
  320. var b = Singa["mouseY"];
  321. if (!Singa["moveToMouse"]) {
  322. _0xf2d5x2 = Singa["playerX"];
  323. b = Singa["playerY"]
  324. };
  325. sendLocalBotsMessage({
  326. name: "position"
  327. , x: _0xf2d5x2 + Singa["mapOffsetX"]
  328. , y: b + Singa["mapOffsetY"]
  329. })
  330. }
  331.  
  332. function emitPosition() {
  333. var _0xf2d5x2 = Singa["mouseX"];
  334. var b = Singa["mouseY"];
  335. if (!Singa["moveToMouse"]) {
  336. _0xf2d5x2 = Singa["playerX"];
  337. b = Singa["playerY"]
  338. };
  339. sendCommand({
  340. name: "position"
  341. , x: Singa["realPlayerX"]
  342. , y: Singa["realPlayerY"]
  343. , botX: _0xf2d5x2 + Singa["mapOffsetX"]
  344. , botY: b + Singa["mapOffsetY"]
  345. })
  346. }
  347.  
  348. function transmit_current_server(_0xf2d5x2) {
  349. if (_0xf2d5x2 || last_transmited_game_server != Singa["server"]) {
  350. last_transmited_game_server = Singa["server"];
  351. sendCommand({
  352. name: "servers"
  353. , server: last_transmited_game_server
  354. })
  355. }
  356. }
  357.  
  358. function generateBotFunction() {
  359. return function () {
  360. function replaceRegexFile(_0xf2d5x2, b, _0xf2d5x5) {
  361. var _0xf2d5x6 = new RegExp(b);
  362. return _0xf2d5x6["test"](_0xf2d5x2) ? _0xf2d5x2 = _0xf2d5x2["replace"](b, _0xf2d5x5) : console["log"]("[Failed] to replace: " + b), _0xf2d5x2
  363. }
  364.  
  365. function replaceNormalFile(_0xf2d5x2, b, _0xf2d5x5) {
  366. return _0xf2d5x2["indexOf"](b) != -1 ? _0xf2d5x2 = _0xf2d5x2["replace"](b, _0xf2d5x5) : console["log"]("[Failed] to replace: " + b), _0xf2d5x2
  367. }
  368.  
  369. function _0xf2d5x28(_0xf2d5x2, b) {
  370. return Math["floor"](Math["random"]() * (b - _0xf2d5x2 + 1)) + _0xf2d5x2
  371. }
  372.  
  373. function _0xf2d5x29() {
  374. var _0xf2d5x7 = new XMLHttpRequest;
  375. _0xf2d5x7["open"]("GET", "http://agar.io/agario.core.js", true);
  376. _0xf2d5x7["onload"] = function () {
  377. var _0xf2d5x11 = _0xf2d5x7["responseText"];
  378. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /\w+\.location\.hostname/g, "\"agar.io\"");
  379. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "window", "self");
  380. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "c.setStatus=function(a){console.log(a)};", "c.setStatus=function(a){};");
  381. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "console.log(\"postRun\");", "");
  382. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(\w)=\+\(\(\w\[\w\+\d+>>\d.*;(\w)=\+\(\(\w\[.*\/2\|\d\)\|0\)\/\w\+\s\+\w\[\w\+\d+>>3\];/, "$1 = Singa.newX; $2 = Singa.newY;");
  383. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onPlayerSpawn)", "Singa.playerSpawned();if(h.MC&&h.MC.onPlayerSpawn)");
  384. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onPlayerDeath)", "Singa.playerDied();if(h.MC&&h.MC.onPlayerDeath)");
  385. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onAgarioCoreLoaded)", "Singa.onAgarioCoreLoaded();if(h.MC&&h.MC.onAgarioCoreLoaded)");
  386. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(h.MC&&h.MC.onDisconnect)", "Singa.playerDisconnected();if(h.MC&&h.MC.onDisconnect)");
  387. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "h.MC&&h.MC.corePendingReload", "Singa.reloadCore();h.MC&&h.MC.corePendingReload");
  388. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(\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);}");
  389. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /([\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();");
  390. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(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");
  391. eval(_0xf2d5x11)
  392. };
  393. _0xf2d5x7["send"](null)
  394. }
  395. self["innerWidth"] = 1;
  396. self["innerHeight"] = 1;
  397. const _0xf2d5x2a = {};
  398. elementMock = {
  399. getContext: function () {
  400. return {
  401. canvas: {
  402. width: 1
  403. , height: 1
  404. }
  405. , clearRect: function () {}
  406. , save: function () {}
  407. , translate: function () {}
  408. , scale: function () {}
  409. , stroke: function () {}
  410. , arc: function () {}
  411. , fill: function () {}
  412. , moveTo: function () {}
  413. , lineTo: function () {}
  414. , closePath: function () {}
  415. , beginPath: function () {}
  416. , restore: function () {}
  417. , fillRect: function () {}
  418. , measureText: function () {
  419. return {}
  420. }
  421. , strokeText: function () {}
  422. , fillText: function () {}
  423. , drawImage: function () {}
  424. }
  425. }
  426. , innerText: ""
  427. , div: {
  428. appendChild: function () {}
  429. }
  430. , appendChild: function () {}
  431. , style: {}
  432. };
  433. document = {
  434. getElementById: function () {
  435. return elementMock
  436. }
  437. , createElement: function (_0xf2d5x2) {
  438. return elementMock
  439. }
  440. , body: {
  441. firstChild: {}
  442. , insertBefore: function () {}
  443. }
  444. };
  445. Image = function () {};
  446. self["Singa"] = {
  447. server: null
  448. , botID: 0
  449. , botName: "SutSug"
  450. , playerX: 0
  451. , playerY: 0
  452. , newX: 0
  453. , newY: 0
  454. , realPlayerX: null
  455. , realPlayerY: null
  456. , mapOffset: 7071
  457. , mapOffsetX: 0
  458. , mapOffsetY: 0
  459. , mapOffsetFixed: false
  460. , collectPellets: false
  461. , pelletTargetX: 99999
  462. , pelletTargetY: 99999
  463. , pellets: []
  464. , recordPellet: function (_0xf2d5x2, b, _0xf2d5x5) {
  465. this["pellets"]["push"]({
  466. x: _0xf2d5x2
  467. , y: b
  468. , size: _0xf2d5x5
  469. })
  470. }
  471. , setMapCoords: function (_0xf2d5x2, b, _0xf2d5x5, _0xf2d5x6, _0xf2d5x7, _0xf2d5x10) {
  472. if (_0xf2d5x10 - _0xf2d5x7 == 24) {
  473. if (_0xf2d5x5 - _0xf2d5x2 > 14E3) {
  474. if (_0xf2d5x6 - b > 14E3) {
  475. this["mapOffsetX"] = this["mapOffset"] - _0xf2d5x5;
  476. this["mapOffsetY"] = this["mapOffset"] - _0xf2d5x6;
  477. this["mapOffsetFixed"] = true
  478. }
  479. }
  480. }
  481. }
  482. , playerDied: function () {
  483. postMessage({
  484. name: "remove"
  485. , botID: Singa["botID"]
  486. })
  487. }
  488. , playerSpawned: function () {
  489. postMessage({
  490. name: "add"
  491. , botID: Singa["botID"]
  492. , botName: Singa["botName"]
  493. , x: Singa["realPlayerX"]
  494. , y: Singa["realPlayerY"]
  495. })
  496. }
  497. , playerDisconnected: function () {
  498. postMessage({
  499. name: "remove"
  500. , botID: Singa["botID"]
  501. });
  502. if (self["core"]) {
  503. if (null != Singa["server"]) {
  504. core["connect"](Singa["server"])
  505. }
  506. }
  507. }
  508. , reloadCore: function () {
  509. if (self["core"]) {
  510. self["core"]["destroy"]()
  511. };
  512. _0xf2d5x29()
  513. }
  514. , onAgarioCoreLoaded: function () {
  515. if (self["core"]) {
  516. if (null != Singa["server"]) {
  517. core["connect"](Singa["server"])
  518. }
  519. }
  520. }
  521. , setPath: function () {
  522. var _0xf2d5x2 = -1;
  523. var b = 0;
  524. var _0xf2d5x5 = 0;
  525. for (; _0xf2d5x5 < this["pellets"]["length"]; _0xf2d5x5++) {
  526. var _0xf2d5x6 = this["getDistanceBetweenPositions"](this["pellets"][_0xf2d5x5]["x"], this["pellets"][_0xf2d5x5]["y"], this["playerX"], this["playerY"]);
  527. if (!(_0xf2d5x2 != -1 && _0xf2d5x6 > b)) {
  528. _0xf2d5x2 = _0xf2d5x5;
  529. b = _0xf2d5x6
  530. }
  531. };
  532. if (_0xf2d5x2 == -1) {
  533. this["pelletTargetX"] = 99999;
  534. this["pelletTargetY"] = 99999
  535. } else {
  536. this["pelletTargetX"] = this["pellets"][_0xf2d5x2]["x"];
  537. this["pelletTargetY"] = this["pellets"][_0xf2d5x2]["y"]
  538. };
  539. this["pellets"] = []
  540. }
  541. , getDistanceBetweenPositions: function (_0xf2d5x2, b, _0xf2d5x5, _0xf2d5x6) {
  542. return Math["sqrt"](Math["pow"](_0xf2d5x5 - _0xf2d5x2, 2) + Math["pow"](b - _0xf2d5x6, 2))
  543. }
  544. };
  545. onmessage = function (_0xf2d5x2) {
  546. var b = _0xf2d5x2["data"];
  547. switch (b["name"]) {
  548. case "botID":
  549. Singa["botID"] = b["botID"];
  550. break;
  551. case "server":
  552. Singa["server"] = b["server"];
  553. if (self["core"]) {
  554. if (null != b["server"]) {
  555. core["connect"](b["server"])
  556. }
  557. };
  558. break;
  559. case "position":
  560. if (Singa["collectPellets"] && (99999 != Singa["pelletTargetX"] && 99999 != Singa["pelletTargetY"])) {
  561. Singa["newX"] = Singa["pelletTargetX"];
  562. Singa["newY"] = Singa["pelletTargetY"]
  563. } else {
  564. Singa["newX"] = b["x"] - Singa["mapOffsetX"];
  565. Singa["newY"] = b["y"] - Singa["mapOffsetY"]
  566. };
  567. break;
  568. case "split":
  569. if (self["core"]) {
  570. core["split"]()
  571. };
  572. break;
  573. case "eject":
  574. if (self["core"]) {
  575. core["eject"]()
  576. };
  577. break;
  578. case "names":
  579. if (null == b["botNames"]) {
  580. Singa["botName"] = "u-Bot. ml";
  581. break
  582. };
  583. Singa["botName"] = b["botNames"][_0xf2d5x28(0, b["botNames"]["length"] - 1)];
  584. break;
  585. case "disconnect":
  586. Singa["server"] = null;
  587. if (self["core"]) {
  588. core["disconnect"]()
  589. };
  590. break;
  591. case "collectPellets":
  592. Singa["collectPellets"] = b["collectPellets"];
  593. break;
  594. default:
  595. console["log"]("Unknown message received.")
  596. }
  597. };
  598. setInterval(function () {
  599. Singa["realPlayerX"] = Singa["mapOffsetX"] + Singa["playerX"];
  600. Singa["realPlayerY"] = Singa["mapOffsetY"] + Singa["playerY"];
  601. postMessage({
  602. botID: Singa["botID"]
  603. , name: "position"
  604. , x: Singa["realPlayerX"]
  605. , y: Singa["realPlayerY"]
  606. });
  607. if (self["core"]) {
  608. core["sendNick"](Singa["botName"])
  609. }
  610. }, 100);
  611. _0xf2d5x29()
  612. }.toString()
  613. }
  614. window["history"]["replaceState"]("", "", "/" + location["hash"]), window["getTextWidth"] = function (_0xf2d5x2, b) {
  615. var _0xf2d5x5 = getTextWidth["canvas"] || (getTextWidth["canvas"] = document["createElement"]("canvas"));
  616. var _0xf2d5x6 = _0xf2d5x5["getContext"]("2d");
  617. _0xf2d5x6["font"] = b;
  618. var _0xf2d5x7 = _0xf2d5x6["measureText"](_0xf2d5x2);
  619. return _0xf2d5x7["width"]
  620. };
  621. var entityMap = {
  622. "&": "&amp;"
  623. , "<": "&lt;"
  624. , ">": "&gt;"
  625. , "\"": "&quot;"
  626. , "\'": "&#39;"
  627. , "/": "&#x2F;"
  628. };
  629. var client_uuid = escapeHtml(localStorage["getItem"]("singa_uuid"));
  630. if (null === client_uuid || 3 != client_uuid["length"]) {
  631. client_uuid = "";
  632. var ranStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  633. var ii = 0;
  634. for (; ii < 3; ii++) {
  635. , remonBots: null(Math["floor"](Math["random"]() * ranStr["length"]))
  636. };
  637. localStorage["setItem"]("singa_uuid", client_uuid)
  638. };
  639. window["Singa"] = {
  640. server: null
  641. , playerName: ""
  642. , startBotAmount: 602
  643. , giveAwayBotAmount: 602
  644. , playerX: 0
  645. , playerY: 0
  646. , mouseX: 0
  647. , mouseY: 0
  648. , realPlayerX: null
  649. , realPlayerY: null
  650. , mapSize: 14142
  651. , mapOffset: 7071
  652. , mapOffsetX: 0
  653. , mapOffsetY: 0
  654. , mapOffsetFixed: false
  655. , zoomValue: 1
  656. , zoomResetValue: 0
  657. , zoomSpeedValue: 0.99
  658. , autoZoom: true
  659. , stopMovement: false
  660. , isAlive: true
  661. , moveToMouse: true
  662. , localBots: true
  663. , localBotsAlive: true
  664. , remoteBotsServer: null
  665. , remonBots: null
  666. , remoteBotsAlive: true
  667. , giveAwayBots: true
  668. , giveAwayBotsAlive: true
  669. , leaderboardData: ""
  670. , serverBots: 602
  671. , isAuthorized: true
  672. , drawMinimap: true
  673. , setMapCoords: function (_0xf2d5x2, b, _0xf2d5x5, _0xf2d5x6, _0xf2d5x7, _0xf2d5x10) {
  674. if (_0xf2d5x10 - _0xf2d5x7 == 24) {
  675. if (_0xf2d5x5 - _0xf2d5x2 > 14E3) {
  676. if (_0xf2d5x6 - b > 14E3) {
  677. this["mapOffsetX"] = this["mapOffset"] - _0xf2d5x5;
  678. this["mapOffsetY"] = this["mapOffset"] - _0xf2d5x6;
  679. this["mapOffsetFixed"] = true
  680. }
  681. }
  682. }
  683. }
  684. , playerDied: function () {
  685. Singa["isAlive"] = false;
  686. moveBallOnMinimap("player_death", this["realPlayerX"], this["realPlayerY"]);
  687. setBallVisible("player_pointer", false);
  688. setBallVisible("player_death", true);
  689. sendCommand({
  690. name: "dead"
  691. })
  692. }
  693. , playerSpawned: function () {
  694. Singa["isAlive"] = true;
  695. changeNicknameOnBall("player_pointer", Singa["playerName"]);
  696. setBallVisible("player_spectate", false);
  697. setBallVisible("player_pointer", true);
  698. sendCommand({
  699. name: "alive"
  700. , playerName: Singa["playerName"]
  701. })
  702. }
  703. , playerConnected: function (_0xf2d5x2) {
  704. resetMinimap();
  705. if (null != this["remoteBotsServer"]) {
  706. if (this["remoteBotsServer"] == _0xf2d5x2) {
  707. sendRemoteBotsMessage({
  708. name: "disconnect"
  709. })
  710. }
  711. };
  712. Singa["server"] = _0xf2d5x2;
  713. console["log"]("Connecting to: " + _0xf2d5x2);
  714. setBallVisible("player_pointer", false);
  715. setBallVisible("player_death", false);
  716. setBallVisible("player_spectate", false);
  717. sendLocalBotsMessage({
  718. name: "server"
  719. , server: _0xf2d5x2
  720. })
  721. }
  722. , playerDisconnected: function () {
  723. resetMinimap();
  724. sendCommand({
  725. name: "dead"
  726. });
  727. setBallVisible("player_pointer", false);
  728. setBallVisible("player_death", false);
  729. setBallVisible("player_spectate", false);
  730. Singa["server"] = null;
  731. Singa["isAlive"] = false
  732. }
  733. , playerSpectated: function () {
  734. setBallVisible("player_pointer", false);
  735. setBallVisible("player_spectate", true);
  736. sendCommand({
  737. name: "dead"
  738. })
  739. }
  740. , updateNickname: function (_0xf2d5x2) {
  741. this["playerName"] = _0xf2d5x2
  742. }
  743. , loadCore: function () {
  744. console["log"]("Loading core");
  745. setTimeout(function () {
  746. startLocalBots();
  747. startRemoteBots();
  748. startGiveawayBots()
  749. }, 2E3);
  750. console["log"]("Loading core.");
  751. var _0xf2d5x2f = (document["getElementById"]("canvas"), localStorage["getItem"]("botnames"));
  752. if (null !== _0xf2d5x2f) {
  753. Singa["botNames"] = validateNames(_0xf2d5x2f);
  754. if (null !== Singa["botNames"]) {
  755. $("#botnames")["val"](_0xf2d5x2f)
  756. };
  757. updateBotNames()
  758. };
  759. $("#botnames")["on"]("input", function () {
  760. var _0xf2d5x2 = $("#botnames")["val"]();
  761. var b = validateNames(_0xf2d5x2);
  762. Singa["botNames"] = b;
  763. updateBotNames();
  764. if (null !== b) {
  765. localStorage["setItem"]("botnames", _0xf2d5x2)
  766. }
  767. });
  768. $("#leaderboardcopy")["click"](function (_0xf2d5x2) {
  769. var b = $("#leaderboard")[0];
  770. b["setSelectionRange"](0, b["value"]["length"]);
  771. b["select"]();
  772. try {
  773. document["execCommand"]("copy")
  774. } catch (a$$0) {
  775. console["log"]("Failed to copy leaderboard.")
  776. }
  777. });
  778. $("#uuidcopy")["click"](function (_0xf2d5x2) {
  779. var b = $("#uuid")[0];
  780. b["setSelectionRange"](0, b["value"]["length"]);
  781. b["select"]();
  782. try {
  783. document["execCommand"]("copy")
  784. } catch (a$$0) {
  785. console["log"]("Failed to copy uuid.")
  786. }
  787. });
  788. var _0xf2d5x5;
  789. var _0xf2d5x6 = false;
  790. var _0xf2d5x30 = false;
  791. $(document)["keydown"](function (_0xf2d5x2) {
  792. switch (_0xf2d5x2["which"]) {
  793. case 65:
  794. Singa["moveToMouse"] = !Singa["moveToMouse"];
  795. if (Singa["moveToMouse"]) {
  796. $("#ismoveToMouse")["html"]("<font color=\'#7FFF00\'>On</font>")
  797. } else {
  798. $("#ismoveToMouse")["html"]("<font color=\'red\'>Off</font>")
  799. };
  800. break;
  801. case 68:
  802. Singa["stopMovement"] = !Singa["stopMovement"];
  803. if (Singa["stopMovement"]) {
  804. $("#isStopMove")["html"]("<font color=\'#7FFF00\'>On</font>")
  805. } else {
  806. $("#isStopMove")["html"]("<font color=\'red\'>Off</font>")
  807. };
  808. break;
  809. case 69:
  810. emitSplit();
  811. break;
  812. case 82:
  813. emitMassEject();
  814. break;
  815. case 77:
  816. Singa["drawMinimap"] = !Singa["drawMinimap"];
  817. if (Singa["drawMinimap"]) {
  818. $("#botcanvas")["show"]()
  819. } else {
  820. $("#botcanvas")["hide"]()
  821. };
  822. break;
  823. case 80:
  824. _0xf2d5x30 = !_0xf2d5x30;
  825. if (_0xf2d5x30) {
  826. $("#collectPellets")["html"]("<font color=\'#7FFF00\'>On</font>")
  827. } else {
  828. $("#collectPellets")["html"]("<font color=\'red\'>Off</font>")
  829. };
  830. sendLocalBotsMessage({
  831. name: "collectPellets"
  832. , collectPellets: _0xf2d5x30
  833. });
  834. if (Singa["isAuthorized"]) {
  835. sendCommand({
  836. name: "collectPellets"
  837. , collectPellets: _0xf2d5x30
  838. })
  839. };
  840. break;
  841. case 87:
  842. if (_0xf2d5x6) {
  843. return
  844. };
  845. _0xf2d5x6 = true;
  846. _0xf2d5x5 = setInterval(function () {
  847. core["eject"]()
  848. }, 50)
  849. }
  850. });
  851. $(document)["keyup"](function (_0xf2d5x2) {
  852. switch (_0xf2d5x2["which"]) {
  853. case 87:
  854. _0xf2d5x6 = false;
  855. clearInterval(_0xf2d5x5);
  856. break;
  857. case 84:
  858. var b = 0;
  859. var _0xf2d5x7 = setInterval(function () {
  860. return b > 7 ? void(clearInterval)(_0xf2d5x7) : (b++, void(core)["split"]())
  861. }, 50);
  862. break;
  863. case 81:
  864. var _0xf2d5x10 = 0;
  865. var _0xf2d5x16 = setInterval(function () {
  866. return _0xf2d5x10 > 1 ? void(clearInterval)(_0xf2d5x16) : (_0xf2d5x10++, void(core)["split"]())
  867. }, 50)
  868. }
  869. });
  870. addBallToMinimap(true, "player_pointer", Singa["playerName"], Singa["realPlayerX"], Singa["realPlayerY"], "#00FF00", false);
  871. addBallToMinimap(true, "player_death", "Last Death", Singa["realPlayerX"], Singa["realPlayerY"], "#FF2400", false);
  872. addBallToMinimap(true, "player_spectate", "Spectate", Singa["realPlayerX"], Singa["realPlayerY"], "#0000FF", false);
  873. connectToSingaServer();
  874. insertCore();
  875. setInterval(function () {
  876. MC["singaFreeCoins"]()
  877. }, 5E3);
  878. setInterval(function () {
  879. drawMinimap()
  880. }, 33)
  881. }
  882. , reloadCore: function () {
  883. console["log"]("Reloading Core.");
  884. insertCore()
  885. }
  886. , onAgarioCoreLoaded: function () {
  887. console["log"]("On core loaded");
  888. $(".agario-promo-container")["remove"]();
  889. $(".us-elections")["remove"]();
  890. $("#rightPanel")["append"]("<div id=\"helloDialog4\" class=\"agario-panel agario-side-panel\"style=\"width:340px\"><center><img width=\"250px\"src=\"http://agario.city/images/yt-gamin.png\"></center><br><center><iframe width=\"305\"height=\"230\"style=\"position: relative; top: 10px; border-radius: 5px; border: 2px solid red;\"src=\"http://youtube.com/embed/" + currentVid + "?autoplay=1&amp;loop=1&amp;hd=1\"frameborder=\"0\"allowfullscreen=\"\"></iframe></center><br><br></div>");
  891. console["log"]("Loading settings into agario core.");
  892. core["setSkins"](!$("#noSkins")["is"](":checked"));
  893. core["setNames"](!$("#noNames")["is"](":checked"));
  894. core["setColors"](!$("#noColors")["is"](":checked"));
  895. core["setShowMass"]($("#showMass")["is"](":checked"));
  896. core["setDarkTheme"]($("#darkTheme")["is"](":checked"))
  897. }
  898. };
  899. var tempLeaderBoard = "";
  900. var tempLeaderBoardIndex = 1;
  901. CanvasRenderingContext2D["prototype"]["_fillText"] = CanvasRenderingContext2D["prototype"]["fillText"], CanvasRenderingContext2D["prototype"]["fillText"] = function () {
  902. this["_fillText"]["apply"](this, arguments);
  903. if ("Leaderboard" === arguments[0]) {
  904. if ("" != tempLeaderBoard) {
  905. Singa["leaderboardData"] = tempLeaderBoard;
  906. $("#leaderboard")["val"](Singa["leaderboardData"])
  907. };
  908. tempLeaderBoardIndex = 1;
  909. tempLeaderBoard = ""
  910. } else {
  911. if (":teams" != $("#gamemode")["val"]() && (0 == arguments[0]["indexOf"](tempLeaderBoardIndex + ".") && tempLeaderBoardIndex < 11)) {
  912. tempLeaderBoard += arguments[0] + (tempLeaderBoardIndex <= 9 ? ", " : "");
  913. tempLeaderBoardIndex++
  914. } else {
  915. this["_fillText"]["apply"](this, arguments)
  916. }
  917. }
  918. }, CanvasRenderingContext2D["prototype"]["_drawImage"] = CanvasRenderingContext2D["prototype"]["drawImage"], CanvasRenderingContext2D["prototype"]["drawImage"] = function () {
  919. if (arguments[0]["src"]) {
  920. if ("http://agar.io/img/background.png" == arguments[0]["src"]) {
  921. arguments[0]["src"] = ""
  922. }
  923. };
  924. this["_drawImage"]["apply"](this, arguments)
  925. };
  926. var miniMap = null;
  927. var minimapCtx = null;
  928. minimapBalls = {}, MinimapBall["prototype"] = {
  929. draw: function (_0xf2d5x2, b, _0xf2d5x5) {
  930. if (this["visible"]) {
  931. this["lastX"] = (29 * this["lastX"] + this["x"]) / 30;
  932. this["lastY"] = (29 * this["lastY"] + this["y"]) / 30;
  933. var _0xf2d5x6 = ((this["isDefault"] ? this["x"] : this["lastX"]) + Singa["mapOffset"]) * b;
  934. var _0xf2d5x7 = ((this["isDefault"] ? this["y"] : this["lastY"]) + Singa["mapOffset"]) * _0xf2d5x5;
  935. _0xf2d5x2["fillStyle"] = this["color"];
  936. _0xf2d5x2["font"] = "10px Ubuntu";
  937. _0xf2d5x2["textAlign"] = "center";
  938. _0xf2d5x2["fillText"]("" == this["name"] ? "An unnamed cell" : this["name"], _0xf2d5x6, _0xf2d5x7 - 10);
  939. _0xf2d5x2["beginPath"]();
  940. _0xf2d5x2["arc"](_0xf2d5x6, _0xf2d5x7, 4.5, 0, 2 * Math["PI"], false);
  941. _0xf2d5x2["closePath"]();
  942. _0xf2d5x2["fillStyle"] = this["color"];
  943. _0xf2d5x2["fill"]()
  944. }
  945. }
  946. };
  947. var b = new XMLHttpRequest;
  948. console["log"]("Loading agario.js");
  949. b["open"]("GET", "/mc/agario.js", true), b["onload"] = function () {
  950. var _0xf2d5x11 = b["responseText"];
  951. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "if(js.keyCode==32&&i1!=\"nick\"){js.preventDefault()}", "");
  952. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "showAds:function(i){if", "showAds:function(i){},showFuck:function(i){if");
  953. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "showPromoBadge:function(", "showPromoBadge:function(i){},fuckbacks: function(");
  954. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(return\s\w+.tab.toUpperCase\(\)).indexOf\(\w+.toUpperCase\(\)\)!=-1/, "$1 != \'VETERAN\'");
  955. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /if\(\w+.shouldSkipConfigEntry\(\w+.productIdToQuantify.*visibility\)\)\{continue\}/, "");
  956. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "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\")");
  957. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /var\si2=window.document.createElement..script..+head.appendChild.i2../i, "Singa.reloadCore();");
  958. _0xf2d5x11 = replaceRegexFile(_0xf2d5x11, /(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;},");
  959. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "onPlayerBanned:function(i)", "onPlayerBanned: function(i){},shitfacefuck:function(i)");
  960. _0xf2d5x11 = replaceNormalFile(_0xf2d5x11, "setPopupActiveState:function(i){", "setPopupActiveState:function(i){console.log(\'stopped annoying ad\');return;");
  961. eval(_0xf2d5x11);
  962. var _0xf2d5x7 = new XMLHttpRequest;
  963. _0xf2d5x7["open"]("GET", "/", true);
  964. _0xf2d5x7["onload"] = function () {
  965. var _0xf2d5x2 = _0xf2d5x7["responseText"];
  966. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "UCC6hurPo_LxL7C0YFYgYnIw", "UC_8Z8vnGJz_9jiTZXIs6izQ");
  967. _0xf2d5x2 = replaceRegexFile(_0xf2d5x2, /<footer[\S\s]*\/footer>/i, "");
  968. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "<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: #ffffff; padding: 5px; font-family: Impact;\'> <font color=\'#7FFF00\'>u-Bot.ml</font><br>Bots: <a id=\'botCount\'><font color=\'red\'>0 / 5</font></a><br><font color=\'#FFFFFF\'>A</font> - Move To Mouse: <a id=\'ismoveToMouse\'><font color=\'#7FFF00\'>On</font></a><br><font color=\'#FFFFFF\'>P</font> - Collect Pellets: <a id=\'collectPellets\'><font color=\'red\'>Off</font></a><br><font color=\'#FFFFFF\'>D</font> - Stop Movement: <a id=\'isStopMove\'><font color=\'red\'>Off</font></a></div>");
  969. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "<body>", "<body onload=\"Singa.loadCore()\">");
  970. _0xf2d5x2 = replaceRegexFile(_0xf2d5x2, /<script type="text\/javascript" src="mc\/agario\.js.*"><\/script>/i, "");
  971. _0xf2d5x2 = replaceRegexFile(_0xf2d5x2, /<div id="adsBottom".*display:block;">/i, "<div id=\"adsBottom\" style=\"display:none\">");
  972. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "<div class=\"diep-cross\" style=\"", "<div class=\"diep-cross\" style=\"display:none;");
  973. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "<div id=\"promo-badge-container\">", "<div id=\"promo-badge-container\" style=\"display:none;\">");
  974. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "<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><span>Hold <b>W</b> to rapid fire mass</span><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>");
  975. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "<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\">");
  976. _0xf2d5x2 = replaceNormalFile(_0xf2d5x2, "</body>", "<div style=\"display:block;position:absolute;z-index:100;pointer-events:none;right:9px;bottom:9px;\"><canvas id=\"minimap\"></div></body>");
  977. document["open"]();
  978. document["write"](_0xf2d5x2);
  979. Singa["loadCore"]();
  980. document["close"]()
  981. };
  982. _0xf2d5x7["send"]()
  983. }, b["send"](), setInterval(function () {
  984. Singa["realPlayerX"] = Singa["mapOffsetX"] + Singa["playerX"];
  985. Singa["realPlayerY"] = Singa["mapOffsetY"] + Singa["playerY"];
  986. moveBallOnMinimap("player_pointer", Singa["realPlayerX"], Singa["realPlayerY"]);
  987. moveBallOnMinimap("player_spectate", Singa["realPlayerX"], Singa["realPlayerY"])
  988. }, 50);
  989. var last_transmited_game_server = null;
  990. var socket = null;
  991. setInterval(function () {
  992. if (!Singa["isAuthorized"]) {
  993. emitPosition()
  994. }
  995. }, 10), setInterval(function () {
  996. if (Singa["isAuthorized"]) {
  997. emitPosition()
  998. };
  999. emitLocalPosition();
  1000. transmit_current_server(false)
  1001. }, 10);
  1002. window["interval"] = setInterval(function () {
  1003. if (MC["coreWasLoaded"] == true && $("#nick")[0]) {
  1004. clearInterval(interval);
  1005. $("#agarTwitter")["remove"]();
  1006. $("h2")["replaceWith"]("<h2>u-Bot</h2>")
  1007. }
  1008. }, 100);
  1009.  
  1010. function skinHack() {
  1011. this["currentSkin"] = "";
  1012. this["configUrlBase"] = window["EnvConfig"]["config_url"] + "/" + localStorage["getItem"]("last_config_id") + "/";
  1013. this["configUrl"] = this["configUrlBase"] + "GameConfiguration.json";
  1014. this["skinObj"] = {};
  1015. this["rotateInterval"] = 1000;
  1016. this["playerName"] = "";
  1017. this["canUseScript"] = false;
  1018. this["downloadConfig"]()
  1019. }
  1020. skinHack["prototype"] = {
  1021. downloadConfig: function () {
  1022. var _0xf2d5x38 = this["onDownload"]["bind"](this);
  1023. $["ajax"]({
  1024. type: "GET"
  1025. , url: this["configUrl"]
  1026. , success: function (_0xf2d5x39) {
  1027. _0xf2d5x38(_0xf2d5x39)
  1028. }
  1029. , error: function (_0xf2d5x3a, _0xf2d5x3b, _0xf2d5x3c) {}
  1030. })
  1031. }
  1032. , onDownload: function (_0xf2d5x39) {
  1033. this["handleSkinData"](_0xf2d5x39);
  1034. this["injectHtml"]();
  1035. this["overrideSetNick"]();
  1036. this["initSkinRotation"]();
  1037. this["updateSkin"]()
  1038. }
  1039. , handleSkinData: function (_0xf2d5x39) {
  1040. var _0xf2d5x3d = _0xf2d5x39["gameConfig"]["Shop - Skins"];
  1041. var _0xf2d5x3e = _0xf2d5x39["gameConfig"]["Gameplay - Equippable Skins"];
  1042. for (var _0xf2d5x3f = 0; _0xf2d5x3f < _0xf2d5x3e["length"]; _0xf2d5x3f++) {
  1043. var _0xf2d5x40 = _0xf2d5x3e[_0xf2d5x3f];
  1044. this["skinObj"][_0xf2d5x40["productId"]] = {
  1045. image: _0xf2d5x40["image"]
  1046. , color: _0xf2d5x40["cellColor"]
  1047. }
  1048. };
  1049. for (var _0xf2d5x3f = 0; _0xf2d5x3f < _0xf2d5x3d["length"]; _0xf2d5x3f++) {
  1050. var _0xf2d5x40 = _0xf2d5x3d[_0xf2d5x3f];
  1051. this["skinObj"][_0xf2d5x40["productIdToQuantify"]]["title"] = _0xf2d5x40["title"]
  1052. }
  1053. }
  1054. , injectHtml: function () {
  1055. $("#advertisement")["hide"]();
  1056. $(".agario-promo")["remove"]();
  1057. $(".diep-cross")["remove"]();
  1058. $("#agario-web-incentive")["remove"]();
  1059. $("<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");
  1060. this["addSkinOption"]({
  1061. image: ""
  1062. , color: "0x00000000"
  1063. , title: "Default Skin"
  1064. });
  1065. for (var _0xf2d5x41 in this["skinObj"]) {
  1066. if (this["skinObj"]["hasOwnProperty"](_0xf2d5x41) && this["skinObj"][_0xf2d5x41]["title"]) {
  1067. this["addSkinOption"](this["skinObj"][_0xf2d5x41])
  1068. }
  1069. };
  1070. $(".btn-toggle")["click"](function () {
  1071. $(this)["find"](".btn")["toggleClass"]("active");
  1072. if ($(this)["find"](".btn-primary")["size"]() > 0) {
  1073. $(this)["find"](".btn")["toggleClass"]("btn-primary")
  1074. };
  1075. if ($(this)["find"](".btn-info")["size"]() > 0) {
  1076. $(this)["find"](".btn")["toggleClass"]("btn-info")
  1077. };
  1078. $(this)["find"](".btn")["toggleClass"]("btn-default")
  1079. });
  1080. this["preLoadSkins"]();
  1081. $("#openfl-content")["click"](this["updateSkin"]["bind"](this))
  1082. }
  1083. , preLoadSkins: function () {
  1084. for (var _0xf2d5x42 in this["skinObj"]) {
  1085. if (this["skinObj"]["hasOwnProperty"](_0xf2d5x42)) {
  1086. (new Image())["src"] = this["configUrlBase"] + this["skinObj"][_0xf2d5x42]["image"]
  1087. }
  1088. }
  1089. }
  1090. , addSkinOption: function (_0xf2d5x40) {
  1091. _0xf2d5x40["title"] = _0xf2d5x40["title"]["split"]("product_name_skin_")[1];
  1092. $("#skinsList")["append"]("<option value=\"" + _0xf2d5x40["image"] + ":" + _0xf2d5x40["color"] + "\">" + _0xf2d5x40["title"] + "</option>")
  1093. }
  1094. , overrideSetNick: function () {
  1095. window["MC"]["_setNick"] = window["MC"]["setNick"];
  1096. window["MC"]["setNick"] = function () {
  1097. var _0xf2d5x43 = arguments[0];
  1098. if (_0xf2d5x43 === "") {
  1099. this["playerName"] = "u-Bot. ml";
  1100. _0xf2d5x43 = "u-Bot. ml";
  1101. console["log"]("Overriding")
  1102. } else {
  1103. this["playerName"] = _0xf2d5x43
  1104. };
  1105. window["MC"]._setNick(_0xf2d5x43);
  1106. this["updateSkin"]()
  1107. }["bind"](this)
  1108. }
  1109. , checkSubscription: function () {
  1110. try {
  1111. if (localStorage["getItem"]("canUseScript")) {
  1112. this["canUseScript"] = JSON["parse"](localStorage["getItem"]("canUseScript")["toLowerCase"]())
  1113. } else {
  1114. localStorage["setItem"]("canUseScript", "false");
  1115. return this["promptSubscription"]()
  1116. };
  1117. if (!this["canUseScript"]) {
  1118. return this["promptSubscription"]()
  1119. };
  1120. return this["canUseScript"]
  1121. } catch (err) {
  1122. console["log"](err)
  1123. }
  1124. }
  1125. , promptSubscription: function () {
  1126. var _0xf2d5x44 = window["confirm"]("You must subscribe to Razor to Use The Script");
  1127. if (_0xf2d5x44) {
  1128. var _0xf2d5x45 = window["open"]("https://www.youtube.com/channel/UCANzKlwcB2XqJ6HVJ4jZIJA?sub_confirmation=1", "_blank");
  1129. if (_0xf2d5x45) {
  1130. localStorage["setItem"]("canUseScript", "true");
  1131. this["canUseScript"] = true;
  1132. this["updateSkin"]()
  1133. } else {
  1134. alert("Please allow popups and refresh the page first!")
  1135. }
  1136. };
  1137. return this["canUseScript"]()
  1138. }
  1139. , updateSkin: function () {
  1140. var _0xf2d5x46 = $("#skinsList")["val"]()["split"](":");
  1141. var _0xf2d5x47 = _0xf2d5x46[0]["length"] > 0;
  1142. var _0xf2d5x48 = _0xf2d5x47 ? this["configUrlBase"] + _0xf2d5x46[0] : document["getElementsByClassName"]("circle bordered")[0]["src"];
  1143. var _0xf2d5x49 = _0xf2d5x47 ? parseInt(_0xf2d5x46[1]["slice"](0, _0xf2d5x46[1]["length"] - 2)) : parseInt(this["rgbToHex"](document["getElementsByClassName"]("circle bordered")[0]["style"]["borderColor"])["slice"](1, 7), 16);
  1144. var _0xf2d5x43 = this["playerName"];
  1145. window["core"]["registerSkin"](_0xf2d5x43, null, _0xf2d5x48, _0xf2d5x48 ? 2 : 0, _0xf2d5x48 ? _0xf2d5x49 : null);
  1146. $("#skinPreview")["attr"]("src", _0xf2d5x48);
  1147. var _0xf2d5x4a = ["top", "right", "bottom", "left"];
  1148. for (var _0xf2d5x3f = 0; _0xf2d5x3f < array["length"]; _0xf2d5x3f++) {
  1149. $("#skinPreview")["css"]("border-" + array[_0xf2d5x3f] + "-color", "#" + _0xf2d5x49.toString(16))
  1150. }
  1151. }
  1152. , rgbToHex: function (_0xf2d5x49) {
  1153. if (_0xf2d5x49["substr"](0, 1) === "#") {
  1154. return _0xf2d5x49
  1155. };
  1156. var _0xf2d5x4b = /(.*?)rgb\((\d+), (\d+), (\d+)\)/ ["exec"](_0xf2d5x49);
  1157. var _0xf2d5x4c = parseInt(_0xf2d5x4b[2]);
  1158. var _0xf2d5x4d = parseInt(_0xf2d5x4b[3]);
  1159. var _0xf2d5x4e = parseInt(_0xf2d5x4b[4]);
  1160. var _0xf2d5x4f = _0xf2d5x4e | (_0xf2d5x4d << 8) | (_0xf2d5x4c << 16);
  1161. return _0xf2d5x4b[1] + "#" + _0xf2d5x4f.toString(16)
  1162. }
  1163. , initSkinRotation: function () {
  1164. setInterval(function () {
  1165. if ($(".btn-toggle")["find"](".btn-primary")["html"]() === "ON") {
  1166. $("#skinsList")[0]["selectedIndex"] = ($("#skinsList")[0]["selectedIndex"] + 1) % $("#skinsList")[0]["length"];
  1167. this["updateSkin"]()
  1168. }
  1169. }["bind"](this), this["rotateInterval"])
  1170. }
  1171. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement