Advertisement
catrachin123

DFSDFSDFSDF

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