Advertisement
Guest User

213213215123512435341324123416r8568986575654523e42532

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