Advertisement
Guest User

Untitled

a guest
Mar 16th, 2020
6,362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.07 KB | None | 0 0
  1. // ==UserScript==
  2. // @name MooMoo.io | SpiZMOD | 2020
  3. // @namespace -
  4. // @version SpiZ 1.4
  5. // @description【Hacks】 ➜ 〖 AUTO HEAL 〗 〖 MOD - MENU - ESC 〗 〖 INSTAKILL - R 〗 〖 AUTOSPIKE - V 〗 〖 MORE FPS 〗 〖 〖 BOOST & SPIKE - G 〗 〖 AUTOWINDMILL - N 〗 〖 HATMACRO 【U CAN CHANGE A KEY FOR HAT MACRO】 〗 〖 PREMIUM MAP 〗 〖 INSTAWINDMILL´S - O 〗 〖 INSTATRAPS / BOOSTPADS - I 〗 〖 CX INSTA - SPACEBAR 〗 〖 INSTASPIKE´S - Ü 〗 〖 AIMCURSOR 〗 〖 BIG SHOP 〗 〖AUTOHAT - M 【Booster & monkey tail - grass | Winter cap & monkey tail - snow】〗
  6. // @author SpiZ
  7. // @match *://moomoo.io/*
  8. // @match *://dev.moomoo.io/*
  9. // @match *://*sandbox.moomoo.io/*
  10. // @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
  11. // @require http://code.jquery.com/jquery-3.3.1.min.js
  12. // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
  13. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
  14. // @description | Just write a review for more hacks :)【Hacks & Hackkeys】 ➜ 〖 AUTO HEAL 〗 〖 MOD - MENU - ESC 〗 〖 INSTAKILL - R 〗 〖 AUTOSPIKE - V 〗 〖 MORE FPS 〗 〖 〖 BOOST & SPIKE - G 〗 〖 AUTOWINDMILL - N 〗 〖 HATMACRO 【U CAN CHANGE A KEY FOR HAT MACRO】 〗 〖 PREMIUM MAP 〗 〖 INSTAWINDMILL´S - O 〗 〖 INSTATRAPS / BOOSTPADS - I 〗 〖 CX insta - SPACEBAR 〗 〖 INSTASPIKE´S - Ü 〗 〖 AIMCURSOR 〗 〖 BIG SHOP 〗 〖BabyMod WEBSITE - TOP LEFT【WOLF SYMBOL】 〗 〖GAMING MUSIC〗
  15. // ==/UserScript==
  16.  
  17. $('#menuContainer').append('')
  18.  
  19. $("#youtuberOf").css({display: "none"});
  20. let newImg = document.createElement("img");
  21. newImg.src = "https://cdn.discordapp.com/avatars/658138409688367114/1eda60a5f8a07d6689fe15ab018eab87.png?size=128";
  22. newImg.style = `position: absolute; top: 15px; left: 15px; z-index: 100000; width: 50px; height: 50px; cursor: pointer;`;
  23. document.body.prepend(newImg);
  24.  
  25. newImg.addEventListener("click", () => {
  26. let w = window.open("https://moomoo-hacks.incms.net/?uid=2&set[page][view]=preview", null, `height=650, width=1199, status=yes, toolbar=no, menubar=no, location=no`);
  27. });
  28.  
  29. try {
  30. document.getElementById("moomooio_728x90_home").style.display = "none";
  31. $("#moomooio_728x90_home").parent().css({display: "none"});
  32. } catch (e) {
  33. console.log(" removing ad");
  34. }
  35.  
  36. unsafeWindow.onbeforeunload = null;
  37.  
  38.  
  39. ({'position':'absolute','bottom':'72px','left':'20px','width':'420px','height':'236.25px','padding-bottom':'18px','margin-top':'0px'});
  40.  
  41. $("#gameCanvas").css('cursor', 'url(http://cur.cursors-4u.net/games/gam-15/gam1422.gif), default');
  42.  
  43. $('.menuCard').css({'white-space': 'normal',
  44. 'text-align': 'center',
  45. 'background-color': 'rgba(0, 0, 0, 0.74)',
  46. '-moz-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
  47. '-webkit-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
  48. 'box-shadow': '0px 0px rgba(255, 255, 255, 0)',
  49. '-webkit-border-radius': '0px',
  50. '-moz-border-radius': '0px',
  51. 'border-radius': '0px',
  52. 'margin': '15px',
  53. 'margin-top': '15px'});
  54.  
  55. $('.menuCard').css({'color':'#808080'});
  56.  
  57.  
  58. $('#menuContainer').css({'white-space': 'normal'});
  59.  
  60.  
  61. $('#guideCard').css({'color': '#FFFFF'});
  62.  
  63. $('.killCounter').css({'color': '#000000'});
  64.  
  65. $('#nativeResolution').css({'cursor': 'pointer'});
  66.  
  67. $('#playMusic').css({'cursor': 'pointer'});
  68.  
  69. $('#skinColorHolder').css({'margin-bottom': '30.75px'});
  70.  
  71. $('.settingRadio').css({'margin-bottom': '30.75px'});
  72.  
  73. $('#gameName').css({'color': '#000000',
  74. 'text-shadow': '0 1px 0 rgba(255, 255, 255, 0), 0 2px 0 rgba(255, 255, 255, 0), 0 3px 0 rgba(255, 255, 255, 0), 0 4px 0 rgba(255, 255, 255, 0), 0 5px 0 rgba(255, 255, 255, 0), 0 6px 0 rgba(255, 255, 255, 0), 0 7px 0 rgba(255, 255, 255, 0), 0 8px 0 rgba(255, 255, 255, 0), 0 9px 0 rgba(255, 255, 255, 0)',
  75. 'text-align': 'center',
  76. 'font-size': '126px',
  77. 'margin-bottom': '-30px'});
  78.  
  79. $('#loadingText').css({'color': '#000000',
  80. 'background-color': 'rgba(0, 0, 0, 0.74)',
  81. 'padding': '8px',
  82. 'right': '150%',
  83. 'left': '150%',
  84. 'margin-top': '40px'});
  85.  
  86. $('.ytLink').css({'color': '#000000',
  87. 'padding': '8px',
  88. 'background-color': 'rgba(0, 0, 0, 0.74)'});
  89.  
  90. $('.menuLink').css({'color': '#000000'});
  91.  
  92. $('.menuButton').css({'background-color': '#000000'});
  93.  
  94.  
  95. $('#nameInput').css({'border-radius': '0px',
  96. '-moz-border-radius': '0px',
  97. '-webkit-border-radius': '0px',
  98. 'border': 'hidden'});
  99.  
  100.  
  101. $('#serverSelect').css({'cursor': 'pointer',
  102. 'color': '#000000',
  103. 'background-color': '#808080',
  104. 'border': 'hidden',
  105. 'font-size': '20px'});
  106.  
  107. $('.menuButton').css({'border-radius': '0px',
  108. '-moz-border-radius': '0px',})
  109.  
  110. var moomooVer = $('#linksContainer2 .menuLink').html(),
  111. hideSelectors = ['#mobileDownloadButtonContainer',
  112. '#followText',
  113. '#smallLinks',
  114. '#linksContainer1',
  115. '#twitterFollow',
  116. '#youtubeFollow',
  117. '#cdm-zone-02',
  118. '#youtuberOf',
  119. '#promoImg',
  120. '#downloadButtonContainer',
  121. '.menuHeader',
  122. '.menuLink',
  123. '.menuHeader:nth-child(5)',
  124. '.menuHeader:nth-child(6)',
  125. '.menuText'
  126. ],
  127. css = '#rightCardHolder {display: block!important}',
  128. head = document.head || document.getElementsByTagName('head')[0],
  129. style = document.createElement('style');
  130.  
  131. style.type = 'text/css';
  132. if (style.styleSheet){
  133. style.styleSheet.cssText = css;
  134. } else {
  135. style.appendChild(document.createTextNode(css));
  136. }
  137.  
  138. for ( let i = 0; i < hideSelectors.length; i++ ) {
  139. $(hideSelectors[i]).hide();
  140. }
  141. head.appendChild(style);
  142. $('#linksContainer2').html('<a href="./docs/versions.txt" target="_blank" class="menuLink">' + moomooVer + '</a>');
  143.  
  144. // document.getElementById("gameUI").style.backgroundImage = "url('')";
  145. // document.getElementById("mainMenu").style.backgroundImage = "url('')";
  146. document.getElementById('enterGame').innerHTML = 'PLAY';
  147. document.getElementById('loadingText').innerHTML = ' Load SpiZMod ';
  148. document.getElementById('nameInput').placeholder = "unknown";
  149. document.getElementById('chatBox').placeholder = "Enter chat";
  150. document.getElementById('diedText').innerHTML = '';
  151. document.getElementById('diedText').style.color = "Green";
  152.  
  153. document.getElementById("storeHolder").style = "height: 1500px; width: 450px;"
  154.  
  155. document.getElementById('adCard').remove();
  156. document.getElementById('errorNotification').remove();
  157.  
  158. document.getElementById("leaderboard").style.color = "white";
  159. document.getElementById("gameName").style.color = "Red";
  160. document.getElementById("setupCard").style.color = "Red";
  161. document.getElementById("gameName").innerHTML = "SpiZMod"
  162. document.getElementById("promoImg").remove();
  163. document.getElementById("scoreDisplay").style.color = "Red";
  164. document.getElementById("woodDisplay").style.color = "Red";
  165. document.getElementById("stoneDisplay").style.color = "Red";
  166. document.getElementById("killCounter").style.color = "Red";
  167. document.getElementById("foodDisplay").style.color = "Red";
  168. document.getElementById("ageText").style.color = "black";
  169. document.getElementById("allianceButton").style.color = "black";
  170. document.getElementById("chatButton").style.color = "black";
  171. document.getElementById("storeButton").style.color = "black";
  172.  
  173. $('.menuCard').css({'white-space': 'normal',
  174. 'text-align': 'center',
  175. 'background-color': 'rgba(0, 0, 0, 0)',
  176. '-moz-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
  177. '-webkit-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
  178. 'box-shadow': '0px 0px rgba(255, 255, 255, 0)',
  179. '-webkit-border-radius': '0px',
  180. '-moz-border-radius': '0px',
  181. 'border-radius': '0px',
  182. 'margin': '15px',
  183. 'margin-top': '15px'});
  184.  
  185. $('#menuContainer').css({'white-space': 'normal'});
  186.  
  187. $('#nativeResolution').css({'cursor': 'pointer'});
  188.  
  189. $('#playMusic').css({'cursor': 'pointer'});
  190.  
  191. $('#guideCard').css({'overflow-y': 'hidden',
  192. 'margin-top': 'auto',
  193. 'margin-bottom': '30px'});
  194.  
  195.  
  196. $('#skinColorHolder').css({'margin-bottom': '30.75px'});
  197.  
  198. $('.settingRadio').css({'margin-bottom': '30.75px'});
  199.  
  200.  
  201.  
  202. $('#linksContainer2').css({'-webkit-border-radius': '0px 0 0 0',
  203. '-moz-border-radius': '0px 0 0 0',
  204. 'border-radius': '0px 0 0 0',
  205. 'right': '44%',
  206. 'left': '44%',
  207. 'background-color': 'rgba(0, 0, 0, 0)',
  208. 'text-align': 'center',
  209. 'bottom': '12px'});
  210.  
  211. $('#gameName').css({'color': '#000000',
  212. 'text-shadow': '0 1px 0 rgba(255, 255, 255, 0), 0 2px 0 rgba(255, 255, 255, 0), 0 3px 0 rgba(255, 255, 255, 0), 0 4px 0 rgba(255, 255, 255, 0), 0 5px 0 rgba(255, 255, 255, 0), 0 6px 0 rgba(255, 255, 255, 0), 0 7px 0 rgba(255, 255, 255, 0), 0 8px 0 rgba(255, 255, 255, 0), 0 9px 0 rgba(255, 255, 255, 0)',
  213. 'text-align': 'center',
  214. 'font-size': '156px',
  215. 'margin-bottom': '-30px'});
  216.  
  217. $('#loadingText').css({'color': '#000000',
  218. 'background-color': 'rgba(0, 0, 0, 0)',
  219. 'padding': '8px',
  220. 'right': '150%',
  221. 'left': '150%',
  222. 'margin-top': '40px'});
  223.  
  224. $('.ytLink').css({'color': '#144db4',
  225. 'padding': '8px',
  226. 'background-color': 'rgba(0, 0, 0, 0)'});
  227.  
  228. $('.menuLink').css({'color': '#144db4'});
  229.  
  230. $('#nameInput').css({'border-radius': '0px',
  231. '-moz-border-radius': '0px',
  232. '-webkit-border-radius': '0px',
  233. 'border': 'hidden'});
  234.  
  235. $('#serverSelect').css({'cursor': 'pointer',
  236. 'color': '#000000',
  237. 'background-color': '#808080',
  238. 'border': 'hidden',
  239. 'font-size': '20px'});
  240.  
  241. $('.menuButton').css({'border-radius': '0px',
  242. '-moz-border-radius': '0px',
  243. '-webkit-border-radius': '0px'});
  244.  
  245. $('#promoImgHolder').css({'position': 'absolute',
  246. 'bottom': '-7%',
  247. 'left': '20px',
  248. 'width': '420px',
  249. 'height': '236.25px',
  250. 'padding-bottom': '18px',
  251. 'margin-top': '0px'});
  252.  
  253. $('#adCard').css({'position': 'absolute',
  254. 'bottom': '-7%',
  255. 'right': '20px',
  256. 'width': '420px',
  257. 'height': '236.25px',
  258. 'padding-bottom': '18px'});
  259.  
  260.  
  261. $('.menuHeader').css({'color': 'rgba(255, 255, 255, 1)'});
  262.  
  263. $('#killCounter').css({'color': '#ededed'});
  264.  
  265. $('#diedText').css({'background-color': 'rgba(0, 0, 0, 0)'});
  266.  
  267. $('#gameCanvas').css({'background-color': '#f4f4f4'});
  268.  
  269. $('#allianceButton').css({'color': 'rgba(241, 241, 241, 1)'});
  270.  
  271. $('#storeButton').css({'color': 'rgba(241, 241, 241, 1)'});
  272.  
  273. $('#chatButton').css({'color': 'rgba(241, 241, 241, 1)'});
  274.  
  275. $('.gameButton').css({'-webkit-border-radius': '0px 0 0 0',
  276. '-moz-border-radius': '0px 0 0 0',
  277. 'border-radius': '0px 0 0 0',
  278. 'background-color': 'rgba(0, 0, 0, 0.4)'});
  279.  
  280. $('.uiElement, .resourceDisplay').css({'-webkit-border-radius': '0px',
  281. '-moz-border-radius': '0px',
  282. 'border-radius': '0px',
  283. 'background-color': 'rgba(0, 0, 0, 0.4)'});
  284.  
  285. $('#chatBox').css({'-webkit-border-radius': '0px',
  286. '-moz-border-radius': '0px',
  287. 'border-radius': '0px',
  288. 'background-color': 'rgba(0, 0, 0, 0.4)',
  289. 'text-align': 'center'});
  290.  
  291. $('#foodDisplay').css({'color': '#ff1a1a'});
  292.  
  293. $('#woodDisplay').css({'color': '#47d147'});
  294.  
  295. $('#stoneDisplay').css({'color': '#a6a6a6'});
  296.  
  297. $('#scoreDisplay').css({'color': '#ffff00'});
  298.  
  299. $('#leaderboard').css({'-webkit-border-radius': '0px',
  300. '-moz-border-radius': '0px',
  301. 'border-radius': '0px',
  302. 'background-color': 'rgba(0, 0, 0, 0.4)',
  303. 'text-align': 'center'});
  304.  
  305. $('#ageText').css({'color': '#ffdfd'});
  306.  
  307. $('#ageBar').css({'-webkit-border-radius': '0px',
  308. '-moz-border-radius': '0px',
  309. 'border-radius': '0px',
  310. 'background-color': 'rgba(0, 0, 0, 0.4)'});
  311.  
  312. $('#ageBarBody').css({'-webkit-border-radius': '0px',
  313. '-moz-border-radius': '0px',
  314. 'border-radius': '0px',
  315. 'background-color': '#f00'});
  316.  
  317. $('.storeTab').css({'-webkit-border-radius': '0px',
  318. '-moz-border-radius': '0px',
  319. 'border-radius': '0px',
  320. 'background-color': 'rgba(0, 0, 0, 0.4)'});
  321.  
  322. $('#storeHolder').css({'-webkit-border-radius': '0px',
  323. '-moz-border-radius': '0px',
  324. 'border-radius': '0px',
  325. 'background-color': 'rgba(0, 0, 0, 0.4)'});
  326.  
  327. $('#allianceHolder').css({'-webkit-border-radius': '0px',
  328. '-moz-border-radius': '0px',
  329. 'border-radius': '0px',
  330. 'background-color': 'rgba(0, 0, 0, 0.4)'});
  331.  
  332. $('.actionBarItem').css({'-webkit-border-radius': '0px',
  333. 'border-radius': '0px',
  334. 'background-color': 'rgba(0, 0, 0, 0.4)'});
  335.  
  336. $('#itemInfoHolder').css({'text-align': 'center',
  337. 'top': '125px',
  338. 'left': '350px',
  339. 'right': '350px',
  340. 'max-width': '666px'});
  341.  
  342. // document.addEventListener("keydown", function(a) {if (a.keyCode == 8,9,13,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,96,97,98,100,101,102,103,104,105,106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,144,145,186,187,188,189,190,191,192,219,220,221,222) {document.getElementById("nameInput").value="FERANYZERIR BOT";}}, false);
  343.  
  344. var myElement = document.querySelector('#nameInput');
  345. myElement.style.backgroundColor = "#fffdfd";
  346. myElement.style.color = "#000000";
  347.  
  348. var getElement = document.querySelector('#enterGame');
  349. getElement.style.backgroundColor = "#d61818";
  350. getElement.style.color = "#000000";
  351.  
  352. $('#leaderboard').append('SpiZMod');
  353.  
  354. var ID_WinterCap = 15;
  355. var ID_FlipperHat = 31;
  356. var ID_MarksmanCap = 1;
  357. var ID_BushGear = 10;
  358. var ID_SoldierHelmet = 6;
  359. var ID_AntiVenomGear = 23;
  360. var ID_MusketeerHat = 32;
  361. var ID_MedicGear = 13;
  362. var ID_BullHelmet = 7;
  363. var ID_EmpHelmet = 22;
  364. var ID_BoosterHat = 12;
  365. var ID_BarbarianArmor = 26;
  366. var ID_BullMask = 46;
  367. var ID_WindmillHat = 14;
  368. var ID_SpikeGear = 11;
  369. var ID_BushidoArmor = 16;
  370. var ID_SamuraiArmor = 20;
  371. var ID_ScavengerGear = 27;
  372. var ID_TankGear = 40;
  373. var ID_TurretGear = 53;
  374. var TankGearKey = 90;
  375. var BullHelmetKey = 74;
  376. var SoldierHelmetKey = 71;
  377. var TurretKey = 72;
  378. var BoosterHatKey = 66;
  379. var uneqiup = 16;
  380. var SpikeGearKey = 89;
  381. var BarabarianKey = 84;
  382. var SpikeKey = 86
  383.  
  384.  
  385. document.getElementById("moomooio_728x90_home").style.display = "none";
  386. $("#moomooio_728x90_home").parent().css({display: "none"});
  387.  
  388.  
  389. var menuChange = document.createElement("div");
  390. menuChange.className = "menuCard";
  391. menuChange.id = "mainSettings";
  392. menuChange.innerHTML = `
  393. <div id="simpleModal" class="modal">
  394. <div class="modal-content">
  395. <div class="modal-header">
  396. <span class="closeBtn">&times;</span>
  397. <h2 style="font-size: 17px;">LabyMod - Settings</h2>
  398. </div>
  399. <div class="modal-body" style="font-size: 17px;">
  400. <div class="flexControl">
  401. <label class="container">Premium Map
  402. <input type="checkbox" id="myCheck">
  403. <span class="checkmark"></span>
  404. </label>
  405. </div>
  406. </div>
  407. <div class="modal-body" style="font-size: 17px;">
  408. <div class="flexControl">
  409. <label class="container">More FPS
  410. <input type="checkbox" id="myCheck">
  411. <span class="checkmark"></span>
  412. </label>
  413. </div>
  414. </div>
  415. <div class="modal-body" style="font-size: 17px;">
  416. <div class="flexControl">
  417. <h3 style="color: black; font-size: 17px;">Hat-keys</h3>
  418. <h3 class="menuPrompt">Tank Gear : </h3> <input value="${String.fromCharCode(TankGearKey)}" id="tankGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
  419. <h3 class="menuPrompt">Bull Helmet : </h3> <input value="${String.fromCharCode(BullHelmetKey)}" id="bullHelm" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
  420. <h3 class="menuPrompt">Soldier Helmet : </h3> <input value="${String.fromCharCode(SoldierHelmetKey)}" id="soldier" class="keyPressLow"onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
  421. <h3 class="menuPrompt">Turret Gear : </h3> <input value="${String.fromCharCode(TurretKey)}" id="turret" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
  422. <h3 class="menuPrompt">Booster Hat : </h3> <input value="${String.fromCharCode(BoosterHatKey)}" id="booster" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
  423. <h3 class="menuPrompt">Spike Gear : </h3> <input value="${String.fromCharCode(SpikeGearKey)}" id="spikeg" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
  424. <h3 class="menuPrompt">Barbarian Armor : </h3> <input value="${String.fromCharCode(BarabarianKey)}" id="barb" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
  425. <hr>
  426. <div class="modal-body" style="font-size: 17px;">
  427. <div class="flexControl">
  428. <label class="container">Hat Macro speed - 560%
  429. <input type="checkbox" id="myCheck">
  430. <span class="checkmark"></span>
  431. </label>
  432. </div>
  433. </div>
  434. <div class="modal-body" style="font-size: 17px;">
  435. <div class="flexControl">
  436. <label class="container">Hat Macro speed - 70% 〖recommended〗
  437. <input type="checkbox" id="myCheck">
  438. <span class="checkmark"></span>
  439. </label>
  440. </div>
  441. </div>
  442. <div class="modal-body" style="font-size: 17px;">
  443. <div class="flexControl">
  444. <label class="container">Hat Macro speed - 130%
  445. <input type="checkbox" id="myCheck">
  446. <span class="checkmark"></span>
  447. </label>
  448. </div>
  449. </div>
  450. <div class="modal-footer">
  451. <p>If you activate hat macro speeds, this is added together</p>
  452. </div>
  453. </div>
  454. </div>
  455. `
  456. document.body.appendChild(menuChange)
  457.  
  458.  
  459. $("#tankGear").on("input", () => {
  460. var cval = $("#tankGear").val();
  461. if (cval){
  462. TankGearKey = cval.toUpperCase();
  463. TankGearKey = TankGearKey.charCodeAt(0);
  464. console.log(TankGearKey);
  465. }
  466. });
  467.  
  468. $("#bullHelm").on("input", () => {
  469. var cval = $("#bullHelm").val();
  470. if (cval){
  471. BullHelmetKey = cval.toUpperCase();
  472. BullHelmetKey = BullHelmetKey.charCodeAt(0);
  473. console.log(BullHelmetKey);
  474. }
  475. });
  476.  
  477. $("#soldier").on("input", () => {
  478. var cval = $("#soldier").val();
  479. if (cval){
  480. SoldierHelmetKey = cval.toUpperCase();
  481. SoldierHelmetKey = SoldierHelmetKey.charCodeAt(0);
  482. console.log(SoldierHelmetKey);
  483. }
  484. });
  485.  
  486. $("#turret").on("input", () => {
  487. var cval = $("#turret").val();
  488. if (cval){
  489. TurretKey = cval.toUpperCase();
  490. TurretKey = TurretKey.charCodeAt(0);
  491. console.log(TurretKey);
  492. }
  493. });
  494.  
  495.  
  496.  
  497. $("#barb").on("input", () => {
  498. var cval = $("#barb").val();
  499. if (cval){
  500. BarabarianKey = cval.toUpperCase();
  501. BarabarianKey = BarabarianKey.charCodeAt(0);
  502. console.log(BarabarianKey);
  503. }
  504. });
  505.  
  506. $("#booster").on("input", () => {
  507. var cval = $("#booster").val();
  508. if (cval){
  509. BoosterHatKey = cval.toUpperCase();
  510. BoosterHatKey = BoosterHatKey.charCodeAt(0);
  511. console.log(BoosterHatKey);
  512. }
  513. });
  514.  
  515. $("#spikeg").on("input", () => {
  516. var cval = $("#spikeg").val();
  517. if (cval){
  518. SpikeGearKey = cval.toUpperCase();
  519. SpikeGearKey = SpikeGearKey.charCodeAt(0);
  520. console.log(SpikeGearKey);
  521. }
  522. });
  523.  
  524. $("#trap").on("input", () => {
  525. var cval = $("#trap").val();
  526. if (cval){
  527. TrapKey = cval.toUpperCase();
  528. TrapKey = TrapKey.charCodeAt(0);
  529. console.log(TrapKey);
  530. }
  531. });
  532.  
  533. var styleItem = document.createElement("style");
  534. styleItem.type = "text/css";
  535. styleItem.appendChild(document.createTextNode(`
  536. .keyPressLow {
  537. margin-left: 8px;
  538. font-size: 16px;
  539. margin-right: 8px;
  540. height: 25px;
  541. width: 50px;
  542. background-color: #fcfcfc;
  543. border-radius: 3.5px;
  544. border: none;
  545. text-align: center;
  546. color: #4A4A4A;
  547. border: 0.5px solid #f2f2f2;
  548. }
  549.  
  550. .menuPrompt {
  551. font-size: 17px;
  552. font-family: 'Hammersmith One';
  553. color: #4A4A4A;
  554. flex: 0.2;
  555. text-align: center;
  556. margin-top: 10px;
  557. display: inline-block;
  558. }
  559.  
  560. .modal {
  561. display: none;
  562. position: fixed;
  563. z-index: 1;
  564. left: 0;
  565. top: 0;
  566. overflow: auto;
  567. height: 100%;
  568. width: 100%;
  569. }
  570.  
  571. .modal-content {
  572. margin: 10% auto;
  573. width: 40%;
  574. box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
  575. font-size: 14px;
  576. line-height: 1.6;
  577. }
  578.  
  579. .modal-header h2,
  580. .modal-footer h3 {
  581. margin: 0;
  582. }
  583.  
  584. .modal-header {
  585. background: #000000;
  586. padding: 15px;
  587. color: #fff;
  588. border-top-left-radius: 5px;
  589. border-top-right-radius: 5px;
  590. }
  591.  
  592. .modal-body {
  593. padding: 10px 20px;
  594. background: #fff;
  595. }
  596.  
  597. .modal-footer {
  598. background: #000000;
  599. padding: 10px;
  600. color: #fff;
  601. text-align: center;
  602. border-bottom-left-radius: 5px;
  603. border-bottom-right-radius: 5px;
  604. }
  605.  
  606. .closeBtn {
  607. color: #ccc;
  608. float: right;
  609. font-size: 30px;
  610. color: #fff;
  611. }
  612.  
  613. .closeBtn:hover,
  614. .closeBtn:focus {
  615. color: #e01313;
  616. text-decoration: none;
  617. cursor: pointer;
  618. }
  619.  
  620. /* Customize the label (the container) */
  621. .container {
  622. display: block;
  623. position: relative;
  624. padding-left: 35px;
  625. margin-bottom: 12px;
  626. cursor: pointer;
  627. font-size: 16px;
  628. -webkit-user-select: none;
  629. -moz-user-select: none;
  630. -ms-user-select: none;
  631. user-select: none;
  632. }
  633.  
  634. /* Hide the browser's default checkbox */
  635. .container input {
  636. position: absolute;
  637. opacity: 0;
  638. cursor: pointer;
  639. height: 0;
  640. width: 0;
  641. }
  642.  
  643. /* Create a custom checkbox */
  644. .checkmark {
  645. position: absolute;
  646. top: 0;
  647. left: 0;
  648. height: 25px;
  649. width: 25px;
  650. background-color: #eee;
  651. }
  652.  
  653. /* On mouse-over, add a grey background color */
  654. .container:hover input ~ .checkmark {
  655. background-color: #ccc;
  656. }
  657.  
  658. /* When the checkbox is checked, add a orange background */
  659. .container input:checked ~ .checkmark {
  660. background-color: #f16210;
  661. }
  662.  
  663. .checkmark:after {
  664. content: "";
  665. position: absolute;
  666. display: none;
  667. }
  668.  
  669. .container input:checked ~ .checkmark:after {
  670. display: block;
  671. }
  672.  
  673. /* Style the checkmark/indicator */
  674. .container .checkmark:after {
  675. left: 9px;
  676. top: 5px;
  677. width: 5px;
  678. height: 10px;
  679. border: solid white;
  680. border-width: 0 3px 3px 0;
  681. -webkit-transform: rotate(45deg);
  682. -ms-transform: rotate(45deg);
  683. transform: rotate(45deg);
  684. }
  685.  
  686. `))
  687. document.head.appendChild(styleItem);
  688.  
  689.  
  690. $("#adCard").css({display: "none"});
  691.  
  692.  
  693. document.addEventListener('keydown', function(e) {
  694. if (e.keyCode == uneqiup && document.activeElement.id.toLowerCase() !== 'chatbox'){
  695. console.log("done")
  696. storeEquip(0);
  697. } else if (e.keyCode == 27){
  698. if (modal.style.display = "none") {
  699. modal.style.display = "block";
  700. } else {
  701. modal.style.display = "none";
  702. }
  703. } else if (e.keyCode == TankGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  704. storeEquip(ID_TankGear);
  705. } else if (e.keyCode == SoldierHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  706. storeEquip(ID_SoldierHelmet);
  707. } else if (e.keyCode == BullHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  708. storeEquip(ID_BullHelmet);
  709. } else if (e.keyCode == BoosterHatKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  710. storeEquip(ID_BoosterHat);
  711. } else if (e.keyCode == BarabarianKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  712. storeEquip(ID_BarbarianArmor);
  713. } else if (e.keyCode == SpikeGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  714. storeEquip(ID_SpikeGear);
  715. } else if (e.keyCode == TurretKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  716. storeEquip(ID_TurretGear);
  717. }
  718. })
  719.  
  720. // Get modal element
  721. var modal = document.getElementById("simpleModal");
  722. // Get close button
  723. var closeBtn = document.getElementsByClassName('closeBtn')[0];
  724.  
  725. // Events
  726. closeBtn.addEventListener('click', closeModal);
  727. window.addEventListener('click', outsideClick);
  728.  
  729. // Close
  730. function closeModal() {
  731. modal.style.display = 'none';
  732. }
  733.  
  734. // Close If Outside Click
  735. function outsideClick(e) {
  736. if (e.target == modal) {
  737. modal.style.display = 'none';
  738. }
  739. }
  740.  
  741. var checkbox = document.querySelector("#myCheck")
  742.  
  743. checkbox.addEventListener('change', function() {
  744. if (this.checked) {
  745. $("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
  746. console.log('checked')
  747. } else {
  748. $("#mapDisplay").css({background: `rgba(0, 0, 0, 0.25)`})
  749. console.log('unchecked')
  750. }
  751. })
  752.  
  753.  
  754. $("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
  755.  
  756. document.getElementById("moomooio_728x90_home").style.display = "none";
  757. $("#moomooio_728x90_home").parent().css({display: "none"});
  758.  
  759. window.onbeforeunload = null;
  760.  
  761. let mouseX;
  762. let mouseY;
  763.  
  764. let width;
  765. let height;
  766.  
  767. setInterval(() => {
  768. if(clanToggle == 1) {
  769. doNewSend(["9", [null]]);
  770. doNewSend(["8", [animate(false, 5)]])
  771. }
  772. doNewSend(["testing", [6]]);
  773. }, 200);
  774.  
  775. setInterval(() => {
  776. if(messageToggle == 1) {
  777. doNewSend(["ch", [animate(true, 5)]])
  778. }
  779. }, 200);
  780.  
  781. setInterval(() => {
  782. if(autoaim == true) {
  783. doNewSend(["2", [nearestEnemyAngle]]);
  784. }
  785. }, 0);
  786.  
  787. setInterval(() => {
  788. if(hatToggle == 1) {
  789. if(oldHat != normalHat) {
  790. hat(normalHat);
  791. console.log("Tried. - Hat")
  792. }
  793. if(oldAcc != normalAcc) {
  794. acc(normalAcc);
  795. console.log("Tried. - Acc")
  796. }
  797. oldHat = normalHat;
  798. oldAcc = normalAcc
  799. }
  800. }, 25);
  801.  
  802. function normal() {
  803. hat(normalHat);
  804. acc(normalAcc);
  805. }
  806.  
  807. function aim(x, y){
  808. var cvs = document.getElementById("gameCanvas");
  809. cvs.dispatchEvent(new MouseEvent("mousemove", {
  810. clientX: x,
  811. clientY: y
  812.  
  813. }));
  814. }
  815.  
  816. let coreURL = new URL(window.location.href);
  817. window.sessionStorage.force = coreURL.searchParams.get("fc");
  818.  
  819. var nearestEnemy;
  820. var nearestEnemyAngle;
  821. var isEnemyNear;
  822. var instaSpeed = 200;
  823. var primary;
  824. var secondary;
  825. var foodType;
  826. var wallType;
  827. var spikeType;
  828. var millType;
  829. var mineType;
  830. var boostType;
  831. var turretType;
  832. var spawnpadType;
  833. var autoaim = false;
  834. var tick = 1;
  835. var oldHat;
  836. var oldAcc;
  837. var enemiesNear;
  838. var normalHat;
  839. var normalAcc;
  840. var ws;
  841. var msgpack5 = msgpack;
  842. var boostDir;
  843. let myPlayer = {
  844. id: null,
  845. x: null,
  846. y: null,
  847. dir: null,
  848. object: null,
  849. weapon: null,
  850. clan: null,
  851. isLeader: null,
  852. hat: null,
  853. accessory: null,
  854. isSkull: null
  855. };
  856.  
  857. let healSpeed = 70;
  858. var messageToggle = 0;
  859. var clanToggle = 0;
  860. let healToggle = 1;
  861. let hatToggle = 1;
  862.  
  863. document.msgpack = msgpack;
  864. function n(){
  865. this.buffer = new Uint8Array([0]);
  866. this.buffer.__proto__ = new Uint8Array;
  867. this.type = 0;
  868. }
  869.  
  870. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  871. WebSocket.prototype.send = function(m){
  872. if (!ws){
  873. document.ws = this;
  874.  
  875. ws = this;
  876. socketFound(this);
  877. }
  878. this.oldSend(m);
  879. };
  880.  
  881.  
  882. function socketFound(socket){
  883. socket.addEventListener('message', function(message){
  884. handleMessage(message);
  885. });
  886. }
  887.  
  888. function handleMessage(m){
  889. let temp = msgpack5.decode(new Uint8Array(m.data));
  890. let data;
  891. if(temp.length > 1) {
  892. data = [temp[0], ...temp[1]];
  893. if (data[1] instanceof Array){
  894. data = data;
  895. }
  896. } else {
  897. data = temp;
  898. }
  899. let item = data[0];
  900. if(!data) {return};
  901.  
  902. if(item === "io-init") {
  903. let cvs = document.getElementById("gameCanvas");
  904. width = cvs.clientWidth;
  905. height = cvs.clientHeight;
  906. $(window).resize(function() {
  907. width = cvs.clientWidth;
  908. height = cvs.clientHeight;
  909. });
  910. cvs.addEventListener("mousemove", e => {
  911. mouseX = e.clientX;
  912. mouseY = e.clientY;
  913. });
  914. }
  915.  
  916. if (item == "1" && myPlayer.id == null){
  917. myPlayer.id = data[1];
  918. }
  919.  
  920. if (item == "33") {
  921. enemiesNear = [];
  922. for(let i = 0; i < data[1].length / 13; i++) {
  923. let playerInfo = data[1].slice(13*i, 13*i+13);
  924. if(playerInfo[0] == myPlayer.id) {
  925. myPlayer.x = playerInfo[1];
  926. myPlayer.y = playerInfo[2];
  927. myPlayer.dir = playerInfo[3];
  928. myPlayer.object = playerInfo[4];
  929. myPlayer.weapon = playerInfo[5];
  930. myPlayer.clan = playerInfo[7];
  931. myPlayer.isLeader = playerInfo[8];
  932. myPlayer.hat = playerInfo[9];
  933. myPlayer.accessory = playerInfo[10];
  934. myPlayer.isSkull = playerInfo[11];
  935. } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
  936. enemiesNear.push(playerInfo);
  937. }
  938. }
  939. }
  940.  
  941. isEnemyNear = false;
  942. if(enemiesNear) {
  943. nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
  944. }
  945.  
  946. if(nearestEnemy) {
  947. nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
  948. if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 300) {
  949. isEnemyNear = true;
  950. if(autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
  951. normalHat = 6;
  952. if(primary != 8) {
  953. normalAcc = 19
  954. }
  955. };
  956. }
  957. }
  958. if(isEnemyNear == false && autoaim == false) {
  959. normalAcc = 11;
  960. if (myPlayer.y < 2400){
  961. normalHat = 15;
  962. } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
  963. normalHat = 31;
  964. } else {
  965. normalHat = 12;
  966. }
  967. }
  968. if (!nearestEnemy) {
  969. nearestEnemyAngle = myPlayer.dir;
  970. }
  971. if(item == "h" && data[1] == myPlayer.id) {
  972. if(data[2] < 100 && data[2] > 0 && healToggle == 1) {
  973. setTimeout( () => {
  974. place(foodType, null);
  975. }, healSpeed);
  976.  
  977. }
  978. }
  979. update();
  980. }
  981.  
  982.  
  983. function doNewSend(sender){
  984. ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
  985. }
  986.  
  987. function acc(id) {
  988. doNewSend(["13c", [0, 0, 1]]);
  989. doNewSend(["13c", [0, id, 1]]);
  990. }
  991.  
  992. function hat(id) {
  993. doNewSend(["13c", [0, id, 0]]);
  994. }
  995.  
  996.  
  997. function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
  998. doNewSend(["5", [id, null]]);
  999. doNewSend(["c", [1, angle]]);
  1000. doNewSend(["c", [0, angle]]);
  1001. doNewSend(["5", [myPlayer.weapon, true]]);
  1002. }
  1003.  
  1004. function boostSpike() {
  1005. if(boostDir == null) {
  1006. boostDir = nearestEnemyAngle;
  1007. }
  1008. place(spikeType, boostDir + toRad(90));
  1009. place(spikeType, boostDir - toRad(90));
  1010. place(boostType, boostDir);
  1011. doNewSend(["33", [boostDir]]);
  1012. }
  1013.  
  1014.  
  1015. var repeater = function(key, action, interval) {
  1016. let _isKeyDown = false;
  1017. let _intervalId = undefined;
  1018.  
  1019. return {
  1020. start(keycode) {
  1021. if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1022. _isKeyDown = true;
  1023. if(_intervalId === undefined) {
  1024. _intervalId = setInterval(() => {
  1025. action();
  1026. if(!_isKeyDown){
  1027. clearInterval(_intervalId);
  1028. _intervalId = undefined;
  1029. console.log("claered");
  1030. }
  1031. }, interval);
  1032. }
  1033. }
  1034. },
  1035.  
  1036. stop(keycode) {
  1037. if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1038. _isKeyDown = false;
  1039. }
  1040. }
  1041. };
  1042.  
  1043.  
  1044. }
  1045.  
  1046. const healer = repeater(81, () => {place(foodType)}, 0);
  1047. const boostPlacer = repeater(70, () => {place(boostType)}, 0);
  1048. const spikePlacer = repeater(86, () => {place(spikeType)}, 0);
  1049. const millPlacer = repeater(78, () => {place(millType)}, 0);
  1050. const turretPlacer = repeater(72, () => {place(turretType)}, 0);
  1051. const boostSpiker = repeater(71, boostSpike, 0);
  1052.  
  1053. document.addEventListener('keydown', (e)=>{
  1054. spikePlacer.start(e.keyCode);
  1055. healer.start(e.keyCode);
  1056. boostPlacer.start(e.keyCode);
  1057. boostSpiker.start(e.keyCode);
  1058. millPlacer.start(e.keyCode);
  1059. turretPlacer.start(e.keyCode);
  1060.  
  1061. if (e.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1062. for (let i=0;i<5;i++){
  1063. let angle = myPlayer.dir + toRad(i * 72);
  1064. place(millType, angle)
  1065. }
  1066. }
  1067. if (e.keyCode == 80 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1068. for (let i=0;i<4;i++){
  1069. let angle = myPlayer.dir + toRad(i * 90);
  1070. place(wallType, angle)
  1071. }
  1072. }
  1073. if (e.keyCode == 73 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1074. for (let i=0;i<4;i++){
  1075. let angle = myPlayer.dir + toRad(i * 90);
  1076. place(boostType, angle)
  1077. }
  1078. }
  1079. if (e.keyCode == 186 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1080. for (let i=0;i<4;i++){
  1081. let angle = myPlayer.dir + toRad(i * 90);
  1082. place(spikeType, angle)
  1083. }
  1084. }
  1085. if (e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1086. place(turretType, myPlayer.dir + toRad(45));
  1087. place(turretType, myPlayer.dir - toRad(45));
  1088. }
  1089.  
  1090. if (e.keyCode == 77 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1091. if (myPlayer.y < 2400){
  1092. hat(15);
  1093. } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
  1094. hat(31);
  1095. } else {
  1096. hat(12);
  1097. }
  1098. acc(11);
  1099. }
  1100. if (e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1101. hat(20);
  1102. }
  1103.  
  1104. if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1105. autoaim = true;
  1106. doNewSend(["5", [primary, true]]);
  1107. doNewSend(["13c", [0, 7, 0]]);
  1108. doNewSend(["13c", [0, 0, 1]]);
  1109. doNewSend(["13c", [0, 19, 1]]);
  1110. doNewSend(["c", [1]]);
  1111. setTimeout( () => {
  1112. doNewSend(["13c", [0, 53, 0]]);
  1113. doNewSend(["5", [secondary, true]]);
  1114. }, instaSpeed - 130);
  1115.  
  1116. setTimeout( () => {
  1117. doNewSend(["5", [primary, true]]);
  1118. doNewSend(["c", [0, null]]);
  1119. doNewSend(["13c", [0, 6, 0]]);
  1120. autoaim = false;
  1121. }, instaSpeed);
  1122. }
  1123.  
  1124. if(e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1125. autoaim = true;
  1126. doNewSend(["5", [primary, true]]);
  1127. doNewSend(["13c", [0, 7, 0]]);
  1128. doNewSend(["13c", [0, 0, 1]]);
  1129. doNewSend(["13c", [0, 19, 1]]);
  1130. place(spikeType);
  1131. doNewSend(["c", [1]]);
  1132.  
  1133. setTimeout( () => {
  1134. doNewSend(["13c", [0, 53, 0]]);
  1135. }, 100);
  1136.  
  1137. setTimeout( () => {
  1138. doNewSend(["c", [0, null]]);
  1139. doNewSend(["13c", [0, 6, 0]]);
  1140. autoaim = false;
  1141. }, 200);
  1142. }
  1143.  
  1144. if(e.keyCode == 38 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1145. messageToggle = (messageToggle + 1) % 2;
  1146. }
  1147.  
  1148. if(e.keyCode == 40 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1149. clanToggle = (clanToggle + 1) % 2;
  1150. }
  1151.  
  1152. if(e.keyCode == 106 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1153. healToggle = (healToggle + 1) % 2;
  1154. if(healToggle == 0) {
  1155. if(hatToggle == 0) {
  1156. document.title = "Heal - OFF | Hat - OFF"
  1157. } else {
  1158. document.title = "Heal - OFF | Hat - ON"
  1159. }
  1160. } else {
  1161. if(hatToggle == 0) {
  1162. document.title = "SpiZMod"
  1163. } else {
  1164. document.title = "SpiZMod"
  1165. }
  1166. }
  1167. }
  1168. if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1169. autoaim = true;
  1170. doNewSend(["5", [secondary, true]]);
  1171. doNewSend(["13c", [0, 53, 0]]);
  1172. doNewSend(["c", [1]]);
  1173.  
  1174. setTimeout( () => {
  1175. doNewSend(["6", [12]]);
  1176. }, 300);
  1177.  
  1178. setTimeout( () => {
  1179. doNewSend(["6", [15]]);
  1180. }, 300);
  1181.  
  1182. setTimeout( () => {
  1183. doNewSend(["c", [0]]);
  1184. doNewSend(["13c", [0, 6, 0]]);
  1185. doNewSend(["5", [primary, true]]);
  1186. autoaim = false;
  1187. }, 300);
  1188. }
  1189.  
  1190. if(e.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1191. doNewSend(["6", [4]]);
  1192. }
  1193.  
  1194. if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1195. doNewSend(["6", [15]]);
  1196. }
  1197. if(e.keyCode == 99 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1198. doNewSend(["6", [28]]);
  1199. }
  1200. if(e.keyCode == 105 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1201. doNewSend(["6", [28]]);
  1202. doNewSend(["6", [25]]);
  1203. }
  1204. if(e.keyCode == 111 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1205. hatToggle = (hatToggle + 1) % 2;
  1206. if(healToggle == 0) {
  1207. if(hatToggle == 0) {
  1208. document.title = "Heal - off|SpiZMod"
  1209. } else {
  1210. document.title = "Heal - off|SpiZMod"
  1211. }
  1212. } else {
  1213. if(hatToggle == 0) {
  1214. document.title = "Heal - on|SpiZMod"
  1215. } else {
  1216. document.title = "Heal - on|SpiZMod"
  1217. }
  1218. }
  1219. }
  1220. })
  1221.  
  1222. document.addEventListener('keyup', (e)=>{
  1223. spikePlacer.stop(e.keyCode);
  1224. boostPlacer.stop(e.keyCode);
  1225. boostSpiker.stop(e.keyCode);
  1226. millPlacer.stop(e.keyCode);
  1227. turretPlacer.stop(e.keyCode);
  1228. healer.stop(e.keyCode);
  1229. if(e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1230. setTimeout( () => {
  1231. doNewSend(["33", [null]]);
  1232. boostDir = null;
  1233. }, 10);
  1234. }
  1235. })
  1236.  
  1237.  
  1238. function isElementVisible(e) {
  1239. return (e.offsetParent !== null);
  1240. }
  1241.  
  1242.  
  1243. function toRad(angle) {
  1244. return angle * 0.01745329251;
  1245. }
  1246.  
  1247. function dist(a, b){
  1248. return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
  1249. }
  1250.  
  1251. function animate(space, chance) {
  1252. let result = '';
  1253. let characters;
  1254. if(space) {
  1255.  
  1256. } else {
  1257.  
  1258. }
  1259. if(space) {
  1260. characters = characters.padStart((30 - characters.length) / 2 + characters.length)
  1261. characters = characters.padEnd(30);
  1262. }
  1263. let count = 0;
  1264. for (let i = 0; i < characters.length; i++ ) {
  1265. if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 2 && characters.charAt(i) != " ") {
  1266. result += "_";
  1267. count++
  1268. } else {
  1269. result += characters.charAt(i);
  1270. }
  1271. }
  1272. return result;
  1273. }
  1274.  
  1275. document.title = "SpiZMod"
  1276.  
  1277. function update() {
  1278. for (let i=0;i<9;i++){
  1279. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1280. primary = i;
  1281. }
  1282. }
  1283.  
  1284. for (let i=9;i<16;i++){
  1285. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1286. secondary = i;
  1287. }
  1288. }
  1289.  
  1290. for (let i=16;i<19;i++){
  1291. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1292. foodType = i - 16;
  1293. }
  1294. }
  1295.  
  1296. for (let i=19;i<22;i++){
  1297. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1298. wallType = i - 16;
  1299. }
  1300. }
  1301.  
  1302. for (let i=22;i<26;i++){
  1303. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1304. spikeType = i - 16;
  1305. }
  1306. }
  1307.  
  1308. for (let i=26;i<29;i++){
  1309. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1310. millType = i - 16;
  1311. }
  1312. }
  1313.  
  1314. for (let i=29;i<31;i++){
  1315. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1316. mineType = i - 16;
  1317. }
  1318. }
  1319.  
  1320. for (let i=31;i<33;i++){
  1321. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1322. boostType = i - 16;
  1323. }
  1324. }
  1325.  
  1326. for (let i=33;i<39;i++){
  1327. if (isElementVisible(document.getElementById("actionBarItem" + i.toString())) && i != 36){
  1328. turretType = i - 16;
  1329. }
  1330. }
  1331.  
  1332. spawnpadType = 36;
  1333. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement