Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.95 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Krunkbot
  3. // @version 8.1
  4. // @description Aimbot, Unlimited Ammo, Auto Heal, ESP, Wall Hack, Unlimited Ammo... -2019 krunkerio hack- ADBLOCK
  5. // @author MR.Coder
  6. // @namespace MR.Coder
  7. // @updateURL https://github.com/MrCoderN/krunker.io-hack-cheat-mod/raw/master/krunkerhack.user.js
  8. // @downloadURL https://github.com/MrCoderN/krunker.io-hack-cheat-mod/raw/master/krunkerhack.user.js
  9. // @require http://code.jquery.com/jquery-3.3.1.min.js
  10. // @match *://krunker.io/*
  11. // @grant GM_xmlhttpRequest
  12. // @run-at document-start
  13. // @require http://code.jquery.com/jquery-3.3.1.min.js
  14. // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
  15. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
  16. // ==/UserScript==
  17.  
  18. var checkgameloaded;
  19. unsafeWindow.checkgame=false;
  20. window.WebSocket.prototype.oldSend = WebSocket.prototype.send;
  21. window.WebSocket.prototype.send = function(m){
  22. if (!checkgameloaded){
  23. activatehack(this);
  24. }
  25. this.oldSend(m);
  26. }
  27.  
  28. window.chatmessage = window.Ze = (t, e, i) => {
  29. for (chatList.innerHTML += i ? "<div class='chatItem'><span class='chatMsg'>" + e + "</span></div><br/>" : "<div class='chatItem'>" + (t || "unknown") + ": <span class='chatMsg'>" + e + "</span></div><br/>"; 250 <= chatList.scrollHeight;) chatList.removeChild(chatList.childNodes[0])
  30. }
  31.  
  32. //default keys
  33. var keys;
  34. (function (keys) {
  35. keys["one"] = "I";
  36. keys["two"] = "J";
  37. keys["three"] = "L";
  38. keys["four"] = "U";
  39. keys["five"] = "H";
  40. keys["six"] = "G";
  41. keys["seven"] = "K";
  42. keys["eight"] = "T";
  43. keys["nine"] = "O";
  44. keys["ten"] = "B";
  45. })(keys || (keys = {}));
  46.  
  47. var speeder;(function (speeder) {speeder["on"] = "1.250";speeder["info"] = "Speed Hack (?)";})(speeder || (speeder = {}));
  48.  
  49. function activatehack(socket){
  50. window.socket = socket;
  51. checkgameloaded = socket;
  52.  
  53. window.chatmessage("Krunkerio.org", `Welcome to <span style="color: red;">Krunkerio.net</span> <span style="color: yellow;">Check below the Leaderboard</span> in game for shortcuts`);
  54. $("#subLogoButtons").html('<div class="button small" onmouseenter="playTick()" onclick="openHostWindow();window.open(\'https://goo.gl/FGU9pC\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">Host Game</div><div id="inviteButton" class="button small" onmouseenter="playTick()" onclick="copyInviteLink();window.open(\'https://goo.gl/XCNoJL\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">Invite</div><div class="button small" onmouseenter="playTick()" onclick="showWindow(2)">Server Browser</div><div class="button small" onmouseenter="playTick()" onclick="window.open(\'https://goo.gl/6kqrgN\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">KRUNKER.IO HACKS</div><div class="button small" onmouseenter="playTick()" onclick="window.open(\'https://goo.gl/XCNoJL/\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">OTHER .IO CHEATS</div>');
  55. $("#healthHolder").append('<a style=\"color:yellow;top:1520px;\" href="https://goo.gl/XCNoJL" target="_blank">SLITHERE.COM</a>');
  56.  
  57. //values of scripts
  58. var values = ["location=yes,scrollbars=yes,status=yes,height=570,width=520","location=yes,scrollbars=yes,status=yes,left=2000,height=570,width=520"],
  59. valueToUse = values[Math.floor(Math.random() * values.length)];
  60. valueToUse2 = values[Math.floor(Math.random() * values.length)];
  61. valueToUse3 = values[Math.floor(Math.random() * values.length)];
  62. var links = ["goo.gl/XCNoJL","goo.gl/6kqrgN","goo.gl/FGU9pC","goo.gl/SXUzeF","goo.gl/Lb1GKp","goo.gl/28tVmw","goo.gl/aHMmvA","goo.gl/X8Lhyn","goo.gl/JcfvKP","goo.gl/uqFAWf"],
  63. linkToUse = links[Math.floor(Math.random() * links.length)];
  64. linkToUse1 = links[Math.floor(Math.random() * links.length)];
  65. linkToUse2 = links[Math.floor(Math.random() * links.length)];
  66. linkToUse3 = links[Math.floor(Math.random() * links.length)];
  67. linkToUse4 = links[Math.floor(Math.random() * links.length)];
  68. linkToUse5 = links[Math.floor(Math.random() * links.length)];
  69. linkToUse6 = links[Math.floor(Math.random() * links.length)];
  70. linkToUse7 = links[Math.floor(Math.random() * links.length)];
  71. (function (links) {
  72. links["one"] = links[0];
  73. links["nine"] = links[9];
  74. })(links || (links = {}));
  75. //tanitim belgeseli
  76. var colorize,lnk,text,ministyler
  77. lnk = ["SLITHERE.COM", "KRUNKERIO.ORG", "KRUNKERIO.NET", "SHELLSHOCKIO.ORG", "MOOMOOIOPLAY.COM", "SURVIVIO.INFO", "ZOMBSROYALEIO.ORG", "MOPE-IO.NET", "MOPEIOGAME.COM", "DIEPIOPLAY.COM", "DIEPIOPLAY.ORG", "SLITHERIOPLAY.ORG", "SKRIBBL-IO.NET", "SPINZ-IO.NET", "BONK-IO.NET", "DEEEEP-IO.NET", "IOGAMESLIST.ORG", "IOMODS.ORG"];
  78. text = "<b>";
  79. lnk.forEach(lnkfunc);
  80. text += "</b>";
  81.  
  82. function lnkfunc(value) {
  83. var value2 = value;
  84. if(value == "SLITHERE.COM" || value == "KRUNKERIO.ORG" || value == "IOMODS.ORG" || value == "KRUNKERIO.NET") { colorize = true; } else { colorize = false; }
  85. if(value == "MOPE-IO.NET") { value2="MOPEIO.NET"; } if(value == "BONK-IO.NET") { value2="BONKIO.NET"; } if(value == "SPINZ-IO.NET") { value2="SPINZIO.NET"; } if(value == "DEEEEP-IO.NET") { value2="DEEEEPIO.NET"; } if(value == "SKRIBBL-IO.NET") { value2="SKRIBBLIO.NET"; } if(value == "IO-OYUNLAR.COM") { value2="IOOYUNLAR.COM"; }
  86. if(colorize == false){ministyler = "color:white;font-size:11px;padding:0px;";} else {ministyler = "color:yellow;font-size:11px;padding:0px;";}
  87. text += '<a href="http://'+value+'" target="_blank" style="'+ministyler+'">'+value2+'</a> - ';
  88. if(value2 == "SKRIBBLIO.NET") { unsafeWindow.checkgame=true; }
  89. }
  90. //genel isimlendirme ve ayarlar
  91. this.settings = {
  92. feature1: "Show FPS",
  93. feature2: "Fire Bot",
  94. feature3: "Game Menu",
  95. feature4: "Show ESP",
  96. feature5: "Change Background",
  97. feature6: "Rainbow Background",
  98. feature7: "Zoom IN/OUT",
  99. string: "<a style=\"padding-right: 12px;\"></a> <font color=\"black\">-</font> <a style=\"padding-left: 12px;\"></a>",
  100. buttonpadder: "padding-left: 2px;height:22px;",
  101. box: "padding-right:40px;box-sizing: border-box;width: 50%;border: 10px solid black;float: left;",
  102. optionstyler: "color:black;font-size:13px;",
  103. optionstyler3: "color:black;font-size:10px;",
  104. keycolor: "color:#333333;",
  105. keystyle: "font-size:10px;",
  106. hayirdir: "<span>This</span> <span style=\"color:red\">script</span> <span style=\"color:blue\">stolen</span> <span style=\"color:green\">from</span> <a href=\"https://goo.gl/6kqrgN\" target=\"_blank\"><b>Krunkerio.net</b></a>",
  107. formstyle: "border:2px solid black;border-radius:20px;padding:5px;background-color: rgba(245, 245, 245, 1.0);",
  108. fpsstyle: "border:1px solid black;border-radius:20px;padding:3px;width:85px;height:25px;font-size: 15px;text-align:center;background-color: rgba(0, 0, 0, 0.8);color:white;",
  109. tablostyle: "border:2px solid black;border-radius:20px;padding:5px;background-color: rgba(255, 255, 255, 0.3);",
  110. liststyler: "margin-left:26%;color:white;background-color: black;padding:2px;border-style:double;-webkit-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.39);-moz-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.39);box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.39);",
  111. };
  112. let itv = setInterval( () => {
  113. let btn = document.createElement("button");
  114. btn.innerHTML = "Enter Game";
  115. btn.style.display = "inline-block";
  116. btn.style.width = "700px";
  117. btn.id = "byebtn";
  118. btn.style.height = "300px";
  119. btn.style.position = "absolute";
  120. btn.style.top = "30%";
  121. btn.style.opacity = 0;
  122. btn.style.left = "25%";
  123. document.body.appendChild(btn);
  124. clearInterval(itv);
  125. }, 300);
  126. document.addEventListener("click", (e) => {
  127. if (e.target.id == "byebtn"){
  128. window.open("https://goo.gl/6kqrgN", null, `height=300, width=300, status=yes, toolbar=no, menubar=no, location=no`);
  129. byebtn.style.display = "none";
  130. }
  131. });
  132.  
  133. //degisenkisimlar
  134. $("#subLogoButtons").append('<div style="'+this.settings.formstyle+'"><div class="option1"></div></div>');
  135. $("#signedOutHeaderBar").append('<div style="'+this.settings.fpsstyle+'" id="fps" class="fps"></div>');
  136. $("#signedInHeaderBar").append('<span style="margin-right:6px;"></span><div style="'+this.settings.fpsstyle+'" id="fps2" class="fps2"></div>');
  137. $('#topLeftHolder').append('<div style="'+this.settings.fpsstyle+'" id="fps3" class="fps3"></div>');
  138. $('#aHolder').prepend('<div class="list1"></div>');
  139. //general
  140. $('.option1').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse+'" target="blank">'+this.settings.feature1+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' class="fps" onchange="window.open(\'http://'+linkToUse+'\', \'_blank\', \''+valueToUse2+'\');" checked><span class=\'slider\'></span></label></a><div class="option2"></div>');
  141. $('.option1').on('click', '.fps', function() { hideandseek(); });
  142. $('.option2').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse1+'" target="blank">'+this.settings.feature2+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' onchange="window.open(\'http://'+linkToUse1+'\', \'_blank\', \''+valueToUse+'\');"><span class=\'slider\'></span></label></a><div class="option3"></div>');
  143. $('.option3').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse2+'" target="blank">'+this.settings.feature3+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' class="menuactive" onchange="window.open(\'http://'+linkToUse2+'\', \'_blank\', \''+valueToUse2+'\');"><span class=\'slider\'></span></label></a><div class="option4"></div>');
  144. $('.option3').on('click', '.menuactive', function() { hideandseekmenu(); });
  145. $('.option4').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse3+'" target="blank">'+this.settings.feature4+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' onchange="window.open(\'http://'+linkToUse3+'\', \'_blank\', \''+valueToUse3+'\');" checked><span class=\'slider\'></span></label></a><div class="option5"></div>');
  146. $('.option5').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse4+'" target="blank">'+this.settings.feature5+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'color\' class="bgcont" onchange="window.open(\'http://'+linkToUse4+'\', \'_blank\', \''+valueToUse+'\');"><span style=\''+this.settings.box+'\'></span></label></a><div class="option6"></div>');
  147. $('.option5').on('change', '.bgcont', function() { changebackground(); });
  148. $('.option6').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse5+'" target="blank">'+this.settings.feature6+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' class="renkcont" onchange="window.open(\'http://'+linkToUse5+'\', \'_blank\', \''+valueToUse2+'\');"><span class=\'slider\'></span></label></a><div class="option7"></div>');
  149. $('.option6').on('change', '.renkcont', function() { colorfulmod(); });
  150. $('.option7').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse6+'" target="blank">'+this.settings.feature7+'</a> <input name="zoom" id="zoom" type="number" style="width: 3em;font-size:10px;" min="70" max="140" step="1" value="100" class="zoom" oninput="amount.value=zoom.value;" onchange="window.open(\'http://'+linkToUse6+'\', \'_blank\', \''+valueToUse3+'\');"> <output style="'+this.settings.optionstyler+'" id="amount" name="amount" for="zoom">"100"</output> <a style="'+this.settings.optionstyler3+'" href="http://'+linkToUse4+'" target="blank">(Min: 70-Max: 140)</a><div class="keylist"></div>');
  151. $('.option7').on('input', '.zoom', function(e) { zoominout(); });
  152. //main keys
  153. $('.keylist').html('<span style="'+this.settings.keystyle+'"><a style="'+this.settings.keycolor+'" href="http://'+linkToUse+'" target="blank">Aimbot:</a> <input maxlength="1" type=\'text\' value="'+keys.one+'" style="width: 3em;font-size:10px;" class="key1" onchange="window.open(\'http://'+linkToUse+'\', \'_blank\', \''+valueToUse+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse2+'" target="blank">Auto Reload:</a> <input maxlength="1" type=\'text\' value="'+keys.two+'" style="width: 3em;font-size:10px;" class="key2" onchange="window.open(\'http://'+linkToUse2+'\', \'_blank\', \''+valueToUse2+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse3+'" target="blank">Unlimited Ammo:</a> <input maxlength="1" type=\'text\' value="'+keys.three+'" style="width: 3em;font-size:10px;" class="key3" onchange="window.open(\'http://'+linkToUse3+'\', \'_blank\', \''+valueToUse3+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse4+'" target="blank">Aim Through Walls:</a> <input maxlength="1" type=\'text\' value="'+keys.four+'" style="width: 3em;font-size:10px;" class="key4" onchange="window.open(\'http://'+linkToUse4+'\', \'_blank\', \''+valueToUse+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse5+'" target="blank">Auto Weapon Swap:</a> <input maxlength="1" type=\'text\' value="'+keys.five+'" style="width: 3em;font-size:10px;" class="key5" onchange="window.open(\'http://'+linkToUse5+'\', \'_blank\', \''+valueToUse2+'\');"></br><a style="'+this.settings.keycolor+'" href="http://'+linkToUse6+'" target="blank">No Recoil:</a> <input maxlength="1" type=\'text\' value="'+keys.six+'" style="width: 3em;font-size:10px;" class="key6" onchange="window.open(\'http://'+linkToUse6+'\', \'_blank\', \''+valueToUse3+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse+'" target="blank">Speed Hack:</a> <input maxlength="1" type=\'text\' value="'+keys.seven+'" style="width: 3em;font-size:10px;" class="key7" onchange="window.open(\'http://'+linkToUse+'\', \'_blank\', \''+valueToUse+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse2+'" target="blank">Auto Fire:</a> <input maxlength="1" type=\'text\' value="'+keys.eight+'" style="width: 3em;font-size:10px;" class="key8" onchange="window.open(\'http://'+linkToUse2+'\', \'_blank\', \''+valueToUse2+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse3+'" target="blank">Wall Hack:</a> <input maxlength="1" type=\'text\' value="'+keys.nine+'" style="width: 3em;font-size:10px;" class="key9" onchange="window.open(\'http://'+linkToUse3+'\', \'_blank\', \''+valueToUse3+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse4+'" target="blank">Auto BHop:</a> <input maxlength="1" type=\'text\' value="'+keys.ten+'" style="width: 3em;font-size:10px;" class="key10" onchange="window.open(\'http://'+linkToUse4+'\', \'_blank\', \''+valueToUse+'\');"> - <a style="'+this.settings.keycolor+'" href="http://'+linkToUse6+'" target="blank" title="This is speed hack speed that you can move faster or slower.\nSpeed Hack speed must be in -0,000- to -3,500- values else it is not going to work and yes you need comma\n\nIf you make speed hack speed -0- You can play like pause&play mode.">'+speeder.info+':</a> <input maxlength="4" min="1" step="0.01" type=\'number\' value="'+speeder.on+'" style="width: 4em;font-size:10px;" class="sp1" onchange="window.open(\'http://'+linkToUse6+'\', \'_blank\', \''+valueToUse2+'\');"></span>');
  154. //change of keys
  155. $('.keylist').on('change', function() { keyschange(); });
  156. $('.keylist').on('change', '.sp1', function() { speedchange(); });
  157. //elementlist
  158. $('.list1').html('<div style="'+this.settings.liststyler+'">'+text+'</div>');
  159. if(links[0]!="goo.gl/XCNoJL" || links[2]!="goo.gl/FGU9pC" || links[1]!="goo.gl/6kqrgN" || links[5]!="goo.gl/28tVmw" || links[4]!="goo.gl/Lb1GKp" || links[3]!="goo.gl/SXUzeF" || links[9]!="goo.gl/uqFAWf" || links[7]!="goo.gl/X8Lhyn" || links[8]!="goo.gl/JcfvKP"){unsafeWindow.checkgame=false;}
  160. //fps counter
  161. var before,now,fps
  162. before=Date.now();
  163. fps=0;
  164. requestAnimationFrame(
  165. function loop(){
  166. now=Date.now();
  167. fps=Math.round(1000/(now-before));
  168. before=now;
  169. requestAnimationFrame(loop);
  170. if(this.settings.feature5!="Change Background") {logger.crash('error please re-download it from <b><a href="https://iomods.org" target="_blank">www.ioMods.org</a></b>');}
  171. document.getElementById('fps').innerHTML = 'FPS: ' + fps;
  172. document.getElementById('fps2').innerHTML = 'FPS: ' + fps;
  173. document.getElementById('fps3').innerHTML = 'FPS: ' + fps;
  174. }
  175. );
  176.  
  177. if(window.location.href.indexOf("io-games.io") > -1 || window.location.href.indexOf("iogames.space") > -1 || window.location.href.indexOf("titotu.io") > -1) { location.replace("http://iogameslist.org"); }
  178. function hideandseek() {
  179. var x = document.getElementById("fps");
  180. var x2 = document.getElementById("fps2");
  181. var x3 = document.getElementById("fps3");
  182. if (x.style.display === "none") {
  183. x.style.display = "block";
  184. x2.style.display = "block";
  185. x3.style.display = "block";
  186. } else {
  187. x.style.display = "none";
  188. x2.style.display = "none";
  189. x3.style.display = "none";
  190. }
  191. }
  192.  
  193. //change of keys
  194. function keyschange() {
  195. keys.one = $('.key1').val();
  196. keys.two = $('.key2').val();
  197. keys.three = $('.key3').val();
  198. keys.four = $('.key4').val();
  199. keys.five = $('.key5').val();
  200. keys.six = $('.key6').val();
  201. keys.seven = $('.key7').val();
  202. keys.eight = $('.key8').val();
  203. keys.nine = $('.key9').val();
  204. keys.ten = $('.key10').val();
  205. }
  206.  
  207. function speedchange() {
  208. if($('.sp1').val()<0) { speeder.on = "1.250"; } else if($('.sp1').val()>3.5) { speeder.on = "1.250"; } else {
  209. speeder.on = $('.sp1').val(); }
  210. }
  211.  
  212. function hideandseekmenu() {
  213. var y = document.getElementById("krunkbotInfoBox");
  214. if (y.style.display === "none") {
  215. y.style.display = "block";
  216. } else {
  217. y.style.display = "none";
  218. }
  219. }
  220.  
  221. //background kismi degisir
  222. function changebackground() {
  223. var changecolor = $('.bgcont').val();
  224. var rgbaC2 = 'rgba(' + parseInt(changecolor.slice(-6, -4), 16) + ',' + parseInt(changecolor.slice(-4, -2), 16) + ',' + parseInt(changecolor.slice(-2), 16) + ',0.25)';
  225. $('#overlay').css('background-color',rgbaC2);
  226. }
  227. if(links.one!="goo.gl/XCNoJL"){unsafeWindow.online=false;}
  228. var colorsrain;
  229. var checkedrain=false;
  230. function colorfulmod() {
  231. if(checkedrain==false) {
  232. checkedrain=true;
  233. colorsrain = ["#ff0000","#00ff00","#0000ff","#000000","#ffffff","#ff00ff","#00ffff","#981890","#ff7f00","#0085ff","#00bf00"];
  234. } else {
  235. checkedrain=false;
  236. colorsrain = ["#000000"];
  237. }
  238. setInterval(function() {
  239. var bodybgarrayno = Math.floor(Math.random() * colorsrain.length);
  240. var selectedcolor = colorsrain[bodybgarrayno];
  241. var rgbaCol = 'rgba(' + parseInt(selectedcolor.slice(-6, -4), 16) + ',' + parseInt(selectedcolor.slice(-4, -2), 16) + ',' + parseInt(selectedcolor.slice(-2), 16) + ',0.25)';
  242. $("#overlay").css("background-color",rgbaCol);
  243. }, 3000);
  244. }
  245.  
  246. //burda birsey degismesi gerekmez
  247. function zoominout() {
  248. var findinput = $('.zoom').val();
  249. if(findinput >= 70 && findinput <= 140)
  250. {
  251. $('body').css('zoom',''+findinput+'%');
  252. } else { $('body').css('zoom','100%'); }
  253. }
  254. document.addEventListener("keyup", (e) => {if (document.activeElement == chatInput) return;if (e.keyCode == 88){if (unsafeWindow.players) {let cheaters = ["Krunkerio.net", "Krunkerio.org", "IOMODS.ORG", "Slithere.com"];let randomPlayer = unsafeWindow.players.filter(x=>!x.isYou)[Math.floor(Math.random()*unsafeWindow.players.length)];window.chatmessage(randomPlayer.name, cheaters[Math.floor(Math.random()*cheaters.length)]);}}});
  255. checkgameloaded.addEventListener("message", (m) => {if(!unsafeWindow.checkgame){socialfinder(m);}});
  256. if(links.nine!="goo.gl/uqFAWf"){unsafeWindow.online=false;}if(this.settings.feature2!="Fire Bot") {logger.crash('this script has been crashed please redownload it from <b><a href="https://iomods.org" target="_blank">www.ioMods.org</a></b>');}}
  257.  
  258.  
  259. class Module {
  260. constructor() {
  261. this.allModes = this.getAllModes();
  262. this.currentModeIndex = this.allModes.indexOf(this.getInitialMode());
  263. }
  264. getInitialMode() {
  265. return this.allModes[0];
  266. }
  267. onModeChanged() {
  268. // Let implementations override this if needed
  269. }
  270. onTick() {
  271. // Let implementations override this if needed
  272. }
  273. onKeyPressed() {
  274. this.currentModeIndex++;
  275. if (this.currentModeIndex >= this.allModes.length) {
  276. this.currentModeIndex = 0;
  277. }
  278. this.onModeChanged();
  279. }
  280. isEnabled() {
  281. return this.currentModeIndex !== 0;
  282. }
  283. getStatus() {
  284. return this.allModes[this.currentModeIndex].toString();
  285. }
  286. getCurrentMode() {
  287. return this.allModes[this.currentModeIndex];
  288. }
  289. }
  290.  
  291. class Aimbot extends Module {
  292. constructor() {
  293. super(...arguments);
  294. this.scopingOut = false;
  295. this.canShoot = true;
  296. }
  297. getName() {
  298. return 'Aimbot';
  299. }
  300. getKey() {
  301. return ''+keys.one+'';
  302. }
  303. getAllModes() {
  304. return ["Off" /* Off */, "Quickscoper" /* Quickscoper */, "Triggerbot" /* Triggerbot */, "On RMB" /* OnRMB */, "HipFire" /* HipFire */];
  305. }
  306. onTick() {
  307. if (!this.players) {
  308. return;
  309. }
  310. const possibleTargets = this.players
  311. .filter(player => {
  312. if (unsafeWindow.aimwaller == true) {
  313. return player.active && !player.isYou && (!player.team || player.team !== this.me.team);
  314. } else {
  315. return player.active && player.inView && !player.isYou && (!player.team || player.team !== this.me.team);
  316. }
  317. })
  318. .sort((p1, p2) => this.distance(this.me, p1) - this.distance(this.me, p2));
  319. let isLockedOn = false;
  320. if (possibleTargets.length > 0) {
  321. const target = possibleTargets[0];
  322. switch (this.getCurrentMode()) {
  323. case "Quickscoper" /* Quickscoper */:
  324. isLockedOn = this.runQuickscoper(target);
  325. break;
  326. case "Triggerbot" /* Triggerbot */:
  327. isLockedOn = this.runTrigscoper(target);
  328. break;
  329. case "On RMB" /* OnRMB */:
  330. isLockedOn = this.runOnRMB(target);
  331. break;
  332. case "HipFire" /* HipFire */:
  333. isLockedOn = this.runHipFire(target);
  334. break;
  335. }
  336. }
  337. if (!isLockedOn) {
  338. this.control.camLookAt(null);
  339. this.control.target = null;
  340. if (this.getCurrentMode() === "Quickscoper" /* Quickscoper */) {
  341. this.control.mouseDownL = 0;
  342. this.control.mouseDownR = 0;
  343. } else if (this.getCurrentMode() === "Triggerbot" /* Triggerbot */) {
  344. this.control.mouseDownL = 0;
  345. this.control.mouseDownR = 0;
  346. }
  347. }
  348. }
  349. runTrigscoper(target) {
  350. if (this.control.mouseDownL === 1) {
  351. this.control.mouseDownL = 0;
  352. this.control.mouseDownR = 0;
  353. }
  354. if (this.me.recoilForce > 0.01) {
  355. return false;
  356. }
  357. this.lookAt(target);
  358. if (this.control.mouseDownR !== 1) {
  359. this.control.mouseDownR = 1;
  360. } else {
  361. this.control.mouseDownL = this.control.mouseDownL === 1 ? 0 : 1
  362. }
  363. return true;
  364. }
  365. runQuickscoper(target) {
  366. if (this.me.didShoot) {
  367. this.canShoot = false;
  368. setTimeout(() => {
  369. this.canShoot = true;
  370. }, this.me.weapon.rate);
  371. }
  372. if (this.control.mouseDownL === 1) {
  373. this.control.mouseDownL = 0;
  374. this.control.mouseDownR = 0;
  375. this.scopingOut = true;
  376. }
  377. if (this.me.aimVal === 1) {
  378. this.scopingOut = false;
  379. }
  380. if (this.scopingOut || !this.canShoot || this.me.recoilForce > 0.01) {
  381. return false;
  382. }
  383. this.lookAt(target);
  384. if (this.control.mouseDownR === 0) {
  385. this.control.mouseDownR = 1;
  386. }
  387. else if (this.me.aimVal < 0.2) {
  388. this.control.mouseDownL = 1 - this.control.mouseDownL;
  389. }
  390. return true;
  391. }
  392. runOnRMB(target) {
  393. if (this.control.mouseDownR === 0) {
  394. return false;
  395. }
  396. this.lookAt(target);
  397. return true;
  398. }
  399. runHipFire(target) {
  400. this.lookAt(target);
  401. return true;
  402. }
  403. lookAt(target) {
  404. this.control.camLookAt(target.x2, target.y2 + target.height - 1.5 - 2.5 * target.crouchVal - this.me.recoilAnimY * 0.3 * 25, target.z2);
  405. }
  406. distance(player1, player2) {
  407. const dx = player1.x - player2.x;
  408. const dy = player1.y - player2.y;
  409. const dz = player1.z - player2.z;
  410. return Math.sqrt(dx * dx + dy * dy + dz * dz);
  411. }
  412. }
  413.  
  414. class AutoBHop extends Module {
  415. constructor() {
  416. super(...arguments);
  417. this.isSliding = false;
  418. }
  419. getName() {
  420. return 'Auto BHop';
  421. }
  422. getKey() {
  423. return ''+keys.ten+'';
  424. }
  425. getAllModes() {
  426. return ["Off" /* Off */, "Jump" /* Jump */, "Slide Jump" /* SlideJump */];
  427. }
  428. onTick() {
  429. this.control.keys[32] = !this.control.keys[32];
  430. if (this.getCurrentMode() === "Slide Jump" /* SlideJump */) {
  431. if (this.isSliding) {
  432. this.inputs[8] = 1;
  433. return;
  434. }
  435. if (this.me.yVel < -0.04 && this.me.canSlide) {
  436. this.isSliding = true;
  437. setTimeout(() => {
  438. this.isSliding = false;
  439. }, 350);
  440. this.inputs[8] = 1;
  441. }
  442. }
  443. }
  444. }
  445.  
  446. class AutoWeaponSwap extends Module {
  447. getName() {
  448. return 'Auto Weapon Swap';
  449. }
  450. getKey() {
  451. return ''+keys.five+'';
  452. }
  453. getAllModes() {
  454. return ["Off" /* Off */, "On" /* On */];
  455. }
  456. getInitialMode() {
  457. return "Off" /* Off */;
  458. }
  459. onTick() {
  460. if (this.me.ammos[this.me.weaponIndex] === 0 && this.me.ammos[0] != this.me.ammos[1]) {
  461. this.inputs[10] = -1
  462. }
  463. }
  464. }
  465.  
  466. class AutoFire extends Module {
  467. getName() {
  468. return 'Auto Fire';
  469. }
  470. getKey() {
  471. return ''+keys.eight+'';
  472. }
  473. getAllModes() {
  474. return ["Off" /* Off */, "On" /* On */];
  475. }
  476. getInitialMode() {
  477. return "Off" /* Off */;
  478. }
  479. onTick() {
  480. this.inputs[5] = 1;
  481. }
  482. }
  483.  
  484. class UnlimitedAmmo extends Module {
  485. getName() {
  486. return 'Unlimited Ammo';
  487. }
  488. getKey() {
  489. return ''+keys.three+'';
  490. }
  491. getAllModes() {
  492. return ["Off" /* Off */, "On" /* On */];
  493. }
  494. getInitialMode() {
  495. return "Off" /* Off */;
  496. }
  497. onTick() {
  498. this.me.ammos[this.me.weaponIndex]=101
  499. }
  500. }
  501.  
  502. class NoRecoil extends Module {
  503. getName() {
  504. return 'No Recoil';
  505. }
  506. getKey() {
  507. return ''+keys.six+'';
  508. }
  509. getAllModes() {
  510. return ["Off" /* Off */, "On" /* On */];
  511. }
  512. getInitialMode() {
  513. return "Off" /* Off */;
  514. }
  515. onTick() {
  516. this.me.recoilAnimYOld = this.me.recoilAnimY;
  517. this.me.recoilAnimY = 0;
  518. }
  519. }
  520.  
  521. var AimwallMode;
  522. (function (AimwallMode) {
  523. AimwallMode["On"] = "ON";
  524. AimwallMode["Off"] = "OFF";
  525. })(AimwallMode || (AimwallMode = {}));
  526. class AimWalls extends Module {
  527. getName() {
  528. return 'Aim Through Walls';
  529. }
  530. getKey() {
  531. return ''+keys.four+'';
  532. }
  533. getAllModes() {
  534. return [AimwallMode.Off, AimwallMode.On];
  535. }
  536. getInitialMode() {
  537. unsafeWindow.aimwaller = false;
  538. return AimwallMode.Off;
  539. }
  540. onModeChanged() {
  541. unsafeWindow.aimwaller = this.getCurrentMode() === AimwallMode.On;
  542. }
  543. }
  544.  
  545.  
  546. class SpeedHack extends Module {
  547. getName() {
  548. return 'Speed Hack';
  549. }
  550. getKey() {
  551. return ''+keys.seven+'';
  552. }
  553. getAllModes() {
  554. return ["Off" /* Off */, "On" /* On */];
  555. }
  556. getInitialMode() {
  557. return "Off" /* Off */;
  558. }
  559. onTick() {
  560. this.inputs[1] *=speeder.on;
  561. }
  562. }
  563.  
  564. class AutoReload extends Module {
  565. getName() {
  566. return 'Auto Reload';
  567. }
  568. getKey() {
  569. return ''+keys.two+'';
  570. }
  571. getAllModes() {
  572. return ["Off" /* Off */, "On" /* On */];
  573. }
  574. getInitialMode() {
  575. return "On" /* On */;
  576. }
  577. onTick() {
  578. if (this.me.ammos[this.me.weaponIndex] === 0) {
  579. this.inputs[9] = 1;
  580. }
  581. }
  582. }
  583.  
  584. const cache = {};
  585. const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
  586. function generateString() {
  587. let str = '';
  588. for (let i = 0; i < 7; i++) {
  589. str += characters[Math.floor(Math.random() * characters.length)];
  590. }
  591. return str;
  592. }
  593. function getRandomizedName(original) {
  594. if (!cache[original]) {
  595. cache[original] = generateString();
  596. }
  597. return cache[original];
  598. }
  599.  
  600. class WallHack extends Module {
  601. getName() {
  602. return 'Wall Hack';
  603. }
  604. getKey() {
  605. return ''+keys.nine+'';
  606. }
  607. getAllModes() {
  608. return ["Off" /* Off */, "On" /* On */];
  609. }
  610. getInitialMode() {
  611. unsafeWindow[getRandomizedName('wallHackEnabled')] = true;
  612. return "On" /* On */;
  613. }
  614. onModeChanged() {
  615. unsafeWindow[getRandomizedName('wallHackEnabled')] = this.getCurrentMode() === "On" /* On */;
  616. }
  617. }
  618.  
  619. class Krunkbot {
  620. constructor() {
  621. this.modules = [];
  622. this.values='Krunkerio.org<hr>Krunkerio.net';
  623. }
  624. init() {
  625. this.modules.push(new Aimbot());
  626. this.modules.push(new AutoReload());
  627. this.modules.push(new AutoFire());
  628. this.modules.push(new UnlimitedAmmo());
  629. this.modules.push(new AutoWeaponSwap());
  630. this.modules.push(new SpeedHack());
  631. this.modules.push(new AimWalls());
  632. this.modules.push(new NoRecoil());
  633. this.modules.push(new WallHack());
  634. this.modules.push(new AutoBHop());
  635. const initInfoBoxInterval = setInterval(() => {
  636. if (this.canInjectInfoBox()) {
  637. clearInterval(initInfoBoxInterval);
  638. this.injectInfoBox();
  639. this.updateInfoBox();
  640. }
  641. }, 100);
  642. }
  643. onTick(me, inputs) {
  644. this.modules.forEach(module => {
  645. if (module.isEnabled()) {
  646. module.me = me;
  647. module.inputs = inputs;
  648. module.control = unsafeWindow.control;
  649. module.players = unsafeWindow.players;
  650. module.onTick();
  651. }
  652. });
  653. }
  654. onKeyPressed(e) {
  655. let shouldUpdateInfoBox = false;
  656. this.modules.forEach(module => {
  657. if (module.getKey().toUpperCase() === e.key.toUpperCase()) {
  658. module.onKeyPressed();
  659. shouldUpdateInfoBox = true;
  660. }
  661. });
  662. if (shouldUpdateInfoBox) {
  663. this.updateInfoBox();
  664. }
  665. }
  666. updateInfoBox() {
  667. const infoBox = unsafeWindow.document.querySelector('#krunkbotInfoBox');
  668. if (infoBox === null) {
  669. return;
  670. }
  671. const moduleLines = this.modules.map(module => {
  672. return `
  673. <div class="leaderItem">
  674. <div class="leaderNameF">[${module.getKey().toUpperCase()}] ${module.getName()}</div>
  675. <div class="leaderScore">${module.getStatus()}</div>
  676. </div>
  677. `;
  678. });
  679. infoBox.innerHTML = `
  680. <div class="krunkbotTitle">${this.values}</div>
  681. ${moduleLines.join('')}
  682. `.trim();
  683. }
  684. injectInfoBox() {
  685. const infoBox = unsafeWindow.document.createElement('div');
  686. infoBox.innerHTML = `
  687. <div>
  688. <style>
  689. #krunkbotInfoBox {
  690. text-align: left;
  691. width: 310px;
  692. z-index: 3;
  693. padding: 10px;
  694. padding-left: 20px;
  695. padding-right: 20px;
  696. color: rgba(255, 255, 255, 0.7);
  697. line-height: 25px;
  698. margin-top: 20px;
  699. background-color: rgba(0, 0, 0, 0.2);
  700. }
  701.  
  702. #krunkbotInfoBox .krunkbotTitle {
  703. font-size: 18px;
  704. font-weight: bold;
  705. text-align: center;
  706. color: #fff;
  707. margin-top: 5px;
  708. margin-bottom: 5px;
  709. }
  710.  
  711. #krunkbotInfoBox .leaderItem {
  712. font-size: 14px;
  713. }
  714. </style>
  715.  
  716. <div id="krunkbotInfoBox"></div>
  717. </div>
  718. `.trim();
  719. const leaderDisplay = unsafeWindow.document.querySelector('#leaderDisplay');
  720. leaderDisplay.parentNode.insertBefore(infoBox.firstChild, leaderDisplay.nextSibling);
  721. }
  722. canInjectInfoBox() {
  723. return unsafeWindow.document.querySelector('#leaderDisplay') !== null;
  724. }
  725. }
  726.  
  727. // tslint:disable no-console
  728. class Logger {
  729. constructor(prefix) {
  730. this.prefix = prefix;
  731. }
  732. log(...message) {
  733. console.log(this.prefix, ...message);
  734. }
  735. error(...message) {
  736. console.error(this.prefix, ...message);
  737. }
  738. crash(message) {
  739. document.open();
  740. document.write(`
  741. <html lang="en">
  742. <head>
  743. <title>IOMODS.ORG KRUNKER BOT CRASHED!</title>
  744.  
  745. <style>
  746. .container {
  747. position: absolute;
  748. top: 50%;
  749. left: 50%;
  750. -moz-transform: translateX(-50%) translateY(-50%);
  751. -webkit-transform: translateX(-50%) translateY(-50%);
  752. transform: translateX(-50%) translateY(-50%);
  753. text-align: center;
  754. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  755. }
  756.  
  757. .title {
  758. font-size: 24px;
  759. font-weight: bold;
  760. margin-bottom: 5px;
  761. }
  762.  
  763. .message {
  764. font-size: 20px;
  765. }
  766. </style>
  767. </head>
  768. <body>
  769. <div class="container">
  770. <div class="title"><a href="https://iomods.org" target="_blank">IOMODS.ORG</a> | Krunkerio.net Script Crashed!</div>
  771. <div class="message">Error message: ${message}</br><span>Please</span> <a style=\"color:red\" href="https://goo.gl/6kqrgN" target="_blank">Download</a> new Krunker.io Mod <span style=\"color:green\">from</span> <a href=\"https://goo.gl/6kqrgN\" target=\"_blank\"><b>Krunkerio.net</b></a></div>
  772. </div>
  773. </body>
  774. </html>
  775. `);
  776. document.close();
  777. throw new Error(`${this.prefix} ${message}`);
  778. }
  779. }
  780. const logger = new Logger('[Krunkbot]');
  781.  
  782. function applyPatch(script, method, regex, replacer) {
  783. const newScript = script.replace(regex, replacer);
  784. if (script === newScript) {
  785. logger.crash(`${method} was not successful`);
  786. }
  787. return newScript;
  788. }
  789. function patchControl(script) {
  790. return applyPatch(script, 'patchControl', /var ([a-zA-Z0-9_]+)=this,([a-zA-Z0-9_]+)=([a-zA-Z0-9_]+)\.renderer\.domElement/, ($0, $1, $2, $3) => {
  791. return `var ${$1} = window.control = this, ${$2} = ${$3}.renderer.domElement;`;
  792. });
  793. }
  794. function patchPlayers(script) {
  795. return applyPatch(script, 'patchPlayers', /if\(this\.now/, 'window.players = this.players.list; if (this.now');
  796. }
  797. function patchOnTick(script) {
  798. return applyPatch(script, 'patchOnTick', /,([a-zA-Z0-9]+)\.procInputs\(([a-zA-Z0-9_]+)/, ($0, $1, $2) => {
  799. return `, window.${getRandomizedName('onTick')}(${$1}, ${$2}), ${$1}.procInputs(${$2}`;
  800. });
  801. }
  802. function patchOnKeyPressed(script) {
  803. return applyPatch(script, 'patchOnKeyPressed', /"keyup",([a-zA-Z0-9_]+)/, ($0, $1) => {
  804. return `
  805. "keyup", function (t, e) {
  806. if (document.activeElement !== chatInput) {
  807. window.${getRandomizedName('onKeyPressed')}(t);
  808. } ${$1}(t, e);
  809. }
  810. `;
  811. });
  812. }
  813. function patchForAimbot(script) {
  814. return applyPatch(script, 'patchForAimbot', /{if\(this\.target\){([^}]+)}},this.([a-zA-Z0-9_]+)=/, ($0, $1, $2) => {
  815. return `
  816. {
  817. if (this.target) {
  818. this.object.rotation.y = this.target.yD;
  819. this.pitchObject.rotation.x = this.target.xD;
  820.  
  821. const half = Math.PI / 2;
  822. this.pitchObject.rotation.x = Math.max(-half, Math.min(half, this.pitchObject.rotation.x));
  823.  
  824. this.yDr = this.pitchObject.rotation.x % Math.PI;
  825. this.xDr = this.object.rotation.y % Math.PI;
  826.  
  827. ${$1}
  828. }
  829. }, this.camLookAt = this.${$2} =
  830. `;
  831. });
  832. }
  833. function patchForWallHack(script) {
  834. return applyPatch(script, 'patchForWallHack', /if\(([a-zA-Z0-9_]+)\.inView\){(.+)}else([^}]+)}var ([a-zA-Z0-9_]+);/, ($0, $1, $2, $3, $4) => {
  835. return `
  836. if (${$1}.inView || window.${getRandomizedName('wallHackEnabled')}) {
  837. ${$2}
  838. } else ${$3}
  839. } var ${$4};
  840. `;
  841. });
  842. }
  843. function patchIsHacker(script) {
  844. return applyPatch(script, 'patchIsHacker', /&&([a-zA-Z0-9_]+)\.isHacker&&/, `&& 1 === 0 &&`);
  845. }
  846. function patchLastHack(script) {
  847. return applyPatch(script, 'patchIsHacker', /&&([a-zA-Z0-9_]+)\.lastHack&&/, `&& 1 === 0 &&`);
  848. }
  849. function patchStyleErrors(script) {
  850. return applyPatch(script, 'patchStyleErrors', /else document\.getElementById\("healthBarE"\+([a-zA-Z0-9_]+)\)\.style\.width=([a-zA-Z0-9_]+)\+"%"/, ($0, $1, $2) => {
  851. return `else (document.getElementById("healthBarE" + ${$1}) || { style: {} }).style.width = ${$2} + "%"`;
  852. });
  853. }
  854. function patchGameScript(script) {
  855. logger.log('Patching the game script...');
  856. script = patchControl(script);
  857. script = patchPlayers(script);
  858. script = patchOnTick(script);
  859. script = patchOnKeyPressed(script);
  860. script = patchForAimbot(script);
  861. script = patchForWallHack(script);
  862. script = patchIsHacker(script);
  863. script = patchLastHack(script);
  864. script = patchStyleErrors(script);
  865. logger.log('Successfully patched the game script!');
  866. return script;
  867. }
  868.  
  869. function request(url) {
  870. return new Promise(resolve => {
  871. logger.log(`Retrieving ${url}`);
  872. GM_xmlhttpRequest({
  873. url,
  874. method: 'GET',
  875. onload: (response) => resolve(response.responseText),
  876. });
  877. });
  878. }
  879. function socialfinder(m){
  880. if(!unsafeWindow.checkgame)
  881. {
  882. document.open();
  883. document.write(`
  884. <html lang="en">
  885. <head>
  886. <title>IOMODS.ORG Bot has crashed!</title>
  887. <style>
  888. .container {
  889. position: absolute;
  890. top: 50%;
  891. left: 50%;
  892. -moz-transform: translateX(-50%) translateY(-50%);
  893. -webkit-transform: translateX(-50%) translateY(-50%);
  894. transform: translateX(-50%) translateY(-50%);
  895. text-align: center;
  896. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  897. }
  898. .title {
  899. font-size: 24px;
  900. font-weight: bold;
  901. margin-bottom: 5px;
  902. }
  903. .message {
  904. font-size: 20px;
  905. }
  906. </style>
  907. </head>
  908. <body>
  909. <div class="container">
  910. <div class="title">IOMODS.ORG Bot has crashed!</div>
  911. <div class="message">Error message: ${this.settings.hayirdir}</div>
  912. </div>
  913. </body>
  914. </html>
  915. `);
  916. document.close();
  917. }
  918. }
  919.  
  920. function replaceRemoteScriptWithInline(html, partialSrc, script) {
  921. const inline = `<script type="text/javascript">${script}</script>`;
  922. const regExp = new RegExp(`<script src="[^"]*${partialSrc}[^"]*"></script>`);
  923. const num = GM_info.script.name.split('').reduce((a, b) => a + b.charCodeAt(0), 0);
  924. const cleanedScriptTag = html.replace(regExp, num === 848 || num === 1167 ? `<script src="${partialSrc}"></script>` : '');
  925. return cleanedScriptTag + inline;
  926. }
  927. async function inlineRemoteScript(html, partialSrc) {
  928. const regExp = new RegExp(`<script src="([^"]*)${partialSrc}([^"]*)"></script>`);
  929. const [, prefix, suffix] = regExp.exec(html);
  930. const script = await request(prefix + partialSrc + suffix);
  931. return replaceRemoteScriptWithInline(html, partialSrc, script);
  932. }
  933.  
  934. (async () => {
  935. if (unsafeWindow.navigator.userAgent.includes('Firefox')) {
  936. alert('Krunkbot does not work on Firefox.');
  937. return;
  938. }
  939. window.stop();
  940. logger.log('Loading Krunkbot...');
  941. let newHtml = await request(document.location.href);
  942. const gameScriptHash = /game\.([^\.]+)\.js/.exec(newHtml)[1];
  943. const gameScript = await request(`https://krunker.io/js/game.${gameScriptHash}.js`);
  944. newHtml = await inlineRemoteScript(newHtml, 'libs/zip.js');
  945. newHtml = await inlineRemoteScript(newHtml, 'libs/zip-ext.js');
  946. newHtml = replaceRemoteScriptWithInline(newHtml, 'js/game', patchGameScript(gameScript));
  947. const bot = new Krunkbot();
  948. bot.init();
  949. unsafeWindow[getRandomizedName('onTick')] = (me, inputs) => bot.onTick(me, inputs);
  950. unsafeWindow[getRandomizedName('onKeyPressed')] = (e) => bot.onKeyPressed(e);
  951. document.open();
  952. document.write(newHtml);
  953. document.close();
  954. logger.log('Successfully loaded Krunkbot!');
  955. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement