Mod

Ez Kills

  1. // ==UserScript==
  2. // @name Mod
  3. // @namespace none
  4. // @version 1.5
  5. // @description Ez Kills
  6. // @author BoamDaToober
  7. // @license MAT
  8. // @icon https://cdn.discordapp.com/attachments/942291806740160552/1187992941306855544/Untitled_design_23.png?ex=6598e7a5&is=658672a5&hm=3b02984cc121d8feced3ba084129cbb21f3b3be25bd8d7c9964f4f176eeeecba&
  9. // @match *://moomoo.io/*
  10. // @match *://sandbox.moomoo.io/*
  11. // @match *://dev.moomoo.io/*
  12. // @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
  13. // @require http://code.jquery.com/jquery-3.3.1.min.js
  14. // @require https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js
  15. // @require https://cdn.jsdelivr.net/npm/fontfaceobserver@2.1.0/fontfaceobserver.standalone.min.js
  16. // @grant none
  17. // ==/UserScript==
  18. /*Mod Log
  19. V1 - Created BEST MOD 2024, devlopment beings
  20. - Added basic macros & auto triple mills
  21. - Fixed buggy placement function
  22. - Added mousebutton hats
  23. - Added perfect spiketick
  24. - Added bullspammer
  25. - added autobreaker
  26. - added heal based hitback
  27. - added anti instas
  28. - added reverse insta
  29. - removed bullspammer
  30. - added music menu
  31. - added boost tick
  32. - added normal insta
  33. - added diamond pol 1 tick
  34. - added sync detect test
  35. - added sync heal q hold
  36. - added a lot of visuals
  37. - major bug fixes
  38. - optimised heal
  39. - removed autobreaker secondary
  40. - added biome map
  41. - fixed heal bugs
  42. - made logo
  43. - changed autobreaker to hold right click
  44. - added menu
  45. - added stack insta
  46. - added bullspam detect
  47. - accessories
  48.  
  49. */
  50. /* KEYBINDS
  51. n - auto triple mills
  52. v - spikes
  53. f - traps
  54. h - double teleporters/turrets
  55. m - music menu
  56. space - perfect spiketick
  57. rightclick - autobreaker
  58. r - normal insta
  59. t - reverse insta
  60. , - boost tick
  61. y - 1 tick
  62. b - bulltick
  63. */
  64.  
  65. setInterval(() => window.follmoo && follmoo(), 10);
  66.  
  67. if(location.hostname == "sandbox.moomoo.io") {
  68. document.getElementById("foodDisplay").style.display = "none";
  69. document.getElementById("woodDisplay").style.display = "none";
  70. document.getElementById("stoneDisplay").style.display = "none";
  71. }
  72.  
  73. document.getElementById("enterGame").addEventListener("click", autohide);
  74. function autohide() {
  75. $("#ot-sdk-btn-floating").hide();
  76. }
  77. document.getElementById("linksContainer2").innerHTML = " ";
  78. let changes = `<div id="subConfirmationElement"><a href="https://discord.gg/BVx8EWfBny">Join Discord!</a></div>`;
  79. $('#linksContainer2').prepend(changes);
  80. $('#subConfirmationElement').click( () => {
  81. try { window.follmoo(); } catch(e){};
  82. localStorage["moofoll"] = "1"; localStorage["moofol"] = "1";
  83. });
  84. document.querySelector("#joinPartyButton").remove();
  85. document.querySelector("#pre-content-container").remove(); //ANTI AD
  86. document.getElementById("gameName").innerHTML = "BESTMODEVER";
  87. let changes2 = `<div id="customMenuName"><h3 style="font-size: 50px;" class = "indent">By BoamDaToober</a></div>`;
  88. $('#gameName').prepend(changes2);
  89. $("#gameName").css({
  90. color: "#333",
  91. "text-shadow": "0 1px 0 #181818, 0 2px 0 #181818, 0 3px 0 #181818, 0 4px 0 #181818, 0 5px 0 #181818, 0 6px 0 #181818, 0 7px 0 #181818, 0 8px 0 #181818, 0 9px 0 #181818, rgba(0, 0, 0, 0.4) 1px 1px 40px",
  92. "text-align": "center",
  93. "font-size": "156px",
  94. "margin-bottom": "-30px",
  95. });
  96. document.getElementById("loadingText").innerHTML = `<div id="MRLAGPRO" class="loader">`
  97. //document.getElementById("loadingText").innerHTML = "BESTMODEVER Loading";
  98. document.getElementById("diedText").innerHTML = "You Are Better Than This!";
  99. document.getElementById("diedText").style.color = "#ffffff";
  100. document.title = " BESTMODEVER";
  101. document.getElementById("leaderboard").append("BESTMODEVER");
  102. $("#mapDisplay").css("background", "url('https://wormax.org/chrome3kafa/moomooio-background.png')");
  103. document.getElementById("storeHolder").style = "height: 1150px; width: 400px;";
  104. document.getElementById('promoImgHolder').innerHTML =
  105. `
  106. <style>
  107. p { font-size: 20px;}#noticationDisplay {
  108. vertical-align: top;
  109. position: absolute;
  110. right: 85%;
  111. top: 10%;
  112. text-align: right;
  113. } .menuButton { transition: 0.5s; border-radius: 0px;
  114. } .menuButton:hover { transform: scale(1.11); box-shadow: 0 0 20px #333;
  115. } #linksContainer2 { background: #ccc; border-top: 5px solid; border-image: linear-gradient(to right,#333,#333) 1 1 0 0; height: 18px; top: 0%; color: #333; transition: 0.3s;
  116. } #linksContainer2:hover { background: #ccc; box-shadow: 0 0 20px #333;
  117. } #top-wrap-right { color: #333;
  118. } .check-box {transform: scale(1.1);
  119. } .inParty {display: none;
  120. } input[type="checkbox"] { position: relative; appearance: none; width: 33px; height: 15.5px; border-radius: 50px; box-shadow: inset 0 0 5px rgba(41, 41, 41, 0.2); cursor: pointer; top: 7.5px; transition: 0.4s;
  121. } input:checked[type="checkbox"] { background: #333;
  122. } input[type="checkbox"]::after { position: absolute; content: ""; width: 15.5px; height: 15.5px; top: 0; left: 0; background: #fff; border-radius: 50%; box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); transform: scale(1.1); transition: 0.4s;
  123. } input:checked[type="checkbox"]::after { left: 50%;
  124. } .menuCard { background-color: #181818; border-top: 5px solid; border-image: linear-gradient(to right,#333,#303030) 1 0 0 0; color: #333; margin-top:0px; border-radius: 0px; border-bottom: 0px solid red; transition: all 1s; transform: scale(1); box-shadow: 0px 0px #333; transform: translateX(0px);
  125. } .menuCard:hover { transform: scale(1.05); box-shadow: 0 0 20px #333;
  126. } .menuCard.active { transform: translateX(0px);
  127. } #adCard { display: none;
  128. } #promoImgHolder { overflow-y: scroll; -ms-overflow-style: none; scrollbar-width: none; height: 90px; max-height: 90px; }
  129. </style>
  130. </head>
  131. <div>
  132. <i class="fa-solid fa-rectangle-list"style="font-size: 25px";></i><p>Update V1.5</p> <div style="font-size: 15px">
  133. - added boost tick<br>
  134. - added normal insta<br>
  135. - added sync detect test<br>
  136. - added sync heal q hold-beta)<br>
  137. - added a lot of visuals<br>
  138. - major bug fixes<br>
  139. - optimised heal<br>
  140. - removed autobreaker secondary<br>
  141. - added biome hat<br>
  142. - fixed heal bugs <br>
  143. - made logo <br>
  144. - changed autobreaker to tankclick<br>
  145. - added menu! <br>
  146. - added stack insta<br>
  147. - added autoaim<br>
  148. - optimised heals<br>
  149. - added bullspam detect<br>
  150. - added accesories <br>
  151. <i class="fa-solid fa-rectangle-list"style="font-size: 25px";></i><p>Update V1.25</p> <div style="font-size: 15px">
  152. - Created BESTMODEVER, devlopment beings<br>
  153. - Added basic macros & auto triple mills<br>
  154. - Fixed buggy placement function<br>
  155. - Added mousebutton hats<br>
  156. - Added perfect spiketick<br>
  157. - Added bullspammer<br>
  158. - added autobreaker<br>
  159. - added heal based hitback<br>
  160. - added anti instas<br>
  161. - added reverse insta<br>
  162. - removed bullspammer<br>
  163. - added music menu<br>
  164.  
  165.  
  166. </div><div style="font-size: 15px">
  167. </div><br>
  168. `
  169. $("#itemInfoHolder").css({ top: "0px", left: "15px" });
  170. $("#youtuberOf").remove();
  171. $("#adCard").remove();
  172. $("#mobileInstructions").remove();
  173. $("#downloadButtonContainer").remove();
  174. $("#mobileDownloadButtonContainer").remove();
  175. $(".downloadBadge").remove();
  176.  
  177. const shadowStyle = "box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.4)";
  178.  
  179. const setupCardDiv = document.getElementById("setupCard");
  180. if (setupCardDiv) {
  181. setupCardDiv.style.cssText += shadowStyle;
  182. }
  183.  
  184. const serverBrowserSelect = document.getElementById("serverBrowser");
  185. if (serverBrowserSelect) {
  186. serverBrowserSelect.style.color = "#333";
  187. serverBrowserSelect.style.backgroundColor = "#e5e3e4";
  188. }
  189.  
  190. const enterGameButton = document.getElementById("TROLL BUTTON");
  191. if (enterGameButton) {
  192. enterGameButton.style.backgroundColor = "#333";
  193. }
  194.  
  195. const style = document.createElement("style");
  196. style.innerHTML = `
  197. .menuLink {
  198. font-size: 20px;
  199. color: #333;
  200. }
  201. a {
  202. color: #333;
  203. text-decoration: none;
  204. }
  205. `;
  206. document.head.appendChild(style);
  207.  
  208. const nameInputElement = document.getElementById("PutDaName");
  209. if (nameInputElement) {
  210. nameInputElement.style.color = "#333";
  211. }
  212.  
  213. const guideCardDiv = document.getElementById("guideCard");
  214. if (guideCardDiv) {
  215. guideCardDiv.style.cssText += shadowStyle;
  216. setupCardDiv.style.backgroundColor = "#181818";
  217. guideCardDiv.style.backgroundColor = "#181818";
  218. }
  219. document.getElementById('chatBox').innerHTML = 'Hi :D';
  220. document.getElementById('gameName').innerHTML = '';
  221. setTimeout(() => {
  222. document.getElementById('gameName').innerHTML = '★';
  223. setTimeout(() => {
  224. document.getElementById('gameName').innerHTML = '★B';
  225. setTimeout(() => {
  226. document.getElementById('gameName').innerHTML = '★Be';
  227. setTimeout(() => {
  228. document.getElementById('gameName').innerHTML = '★Bes';
  229. setTimeout(() => {
  230. document.getElementById('gameName').innerHTML = '★Best';
  231. setTimeout(() => {
  232. document.getElementById('gameName').innerHTML = '★BestM';
  233. setTimeout(() => {
  234. document.getElementById('gameName').innerHTML = 'BestMo';
  235. setTimeout(() => {
  236. document.getElementById('gameName').innerHTML = '★BestMod';
  237. setTimeout(() => {
  238. document.getElementById('gameName').innerHTML = '★BestMod!';
  239. setTimeout(() => {
  240. document.getElementById('gameName').innerHTML = '★BestMod✔';
  241. }, 120);
  242. }, 120);
  243. }, 120);
  244. }, 120);
  245. }, 120);
  246. }, 120);
  247. }, 120);
  248. }, 120);
  249. }, 120);
  250. }, 120);
  251. document.getElementById('loadingText').innerHTML = 'Loading...';
  252. setTimeout(() => {
  253. document.getElementById('loadingText').innerHTML = '✅Successful✅';
  254. }, 710);
  255.  
  256. (function () {
  257. if (document.querySelector("#customAudioPlayer")) return;
  258. var audioFiles = [
  259. {
  260. url: "https://cdn.discordapp.com/attachments/1062441866416619653/1069324203297362040/Barren_Gates_-_Obey_NCS_Release.mp3",
  261. title: "Obey NCS",
  262. },
  263. {
  264. url: "https://cdn.discordapp.com/attachments/1062441866416619653/1069323837608570941/Clarx_-_Zig_Zag_NCS_Release.mp3",
  265. title: "Zig Zag NCS",
  266. },
  267. {
  268. url: "https://cdn.discordapp.com/attachments/1062441866416619653/1069300879708135524/Anixto_-_Ride_Or_Die_NCS_Release.mp3",
  269. title: "Ride Or Die NCS",
  270. },
  271. {
  272. url: "https://cdn.discordapp.com/attachments/1062441866416619653/1069324799903531128/MP3DL.CC_Rival_-_Throne_-_ft._Neoni_NCS_Release-256k.mp3",
  273. title: "Throne NCS",
  274. },
  275. {
  276. url: "https://cdn.discordapp.com/attachments/905994516719345664/918544988965568562/Dirty_Palm_-_Ropes_feat._Chandler_Jewels_NCS10_Release.mp3",
  277. title: "Ropes NCS",
  278. },
  279. {
  280. url: "https://cdn.discordapp.com/attachments/905994516719345664/918546211584213023/Jonth_Tom_Wilson_Facading_MAGNUS_Jagsy_Vosai_RudeLies__Domastic_-_Heartless_NCS10_Release.mp3",
  281. title: "Heartless NCS",
  282. },
  283. {
  284. url: "https://cdn.discordapp.com/attachments/905873563490328626/920005714481672212/Anikdote_-_Turn_It_Up_NCS_Release.mp3",
  285. title: "Turn It Up NCS",
  286. },
  287. {
  288. url: "https://cdn.discordapp.com/attachments/905873563490328626/920006439999778856/Unknown_Brain_-_MATAFAKA_feat._Marvin_Divine_NCS_Release.mp3",
  289. title: "MATAFKA NCS",
  290. },
  291. {
  292. url: "https://cdn.discordapp.com/attachments/905994516719345664/918910823290769458/koven_never_have_i_felt_this_ncs_release_gqEQ_nIByoK-gucZcxBO.mp3",
  293. title: "Never Have I Felt This NCS",
  294. },
  295. {
  296. url: "https://cdn.discordapp.com/attachments/905994516719345664/925144953611505714/Rebel_Scum__Dani_King__Centrix_-_Calm_Before_The_Storm_NCS_Release.mp3",
  297. title: "Calm Before The Storm NCS",
  298. },
  299. ];
  300. var currentIndex = 0;
  301. var audio = new Audio(audioFiles[currentIndex].url);
  302. audio.preload = "auto";
  303. audio.volume = 0.1;
  304. var repeat = false;
  305. var shuffled = false;
  306. function playNext() {
  307. if (shuffled) {
  308. currentIndex = Math.floor(Math.random() * audioFiles.length);
  309. } else if (!repeat) {
  310. currentIndex = (currentIndex + 1) % audioFiles.length;
  311. }
  312. audio.src = audioFiles[currentIndex].url;
  313. audio.play();
  314. label.textContent = audioFiles[currentIndex].title;
  315. playButton.textContent = "Pause";
  316. playButton.style.background = "red";
  317. var trackButtons = document.querySelectorAll(".track-button");
  318. trackButtons.forEach(function (trackButton, index) {
  319. if (index === currentIndex) {
  320. trackButton.classList.add("active");
  321. } else {
  322. trackButton.classList.remove("active");
  323. }
  324. });
  325. }
  326. function formatDuration(duration) {
  327. var minutes = Math.floor(duration / 60);
  328. var seconds = Math.floor(duration % 60);
  329. return minutes + ":" + (seconds < 10 ? "0" : "") + seconds;
  330. }
  331. audio.addEventListener("ended", playNext);
  332. audio.addEventListener("timeupdate", function () {
  333. durationDisplay.textContent =
  334. formatDuration(audio.currentTime) + "/" + formatDuration(audio.duration);
  335. });
  336. var player = document.createElement("div");
  337. player.id = "customAudioPlayer";
  338. player.style =
  339. "position:fixed;top:10px;left:10px;z-index:10001;background:#282828;border:1px solid black;padding:20px;border-radius:10px;width:300px;color:#fff;box-shadow:0px 0px 20px 5px rgba(0,0,0,0.75);display:none;flex-direction:column;align-items:center;";
  340. var profilePicture = document.createElement("img");
  341. profilePicture.src =
  342. "https://yt3.ggpht.com/jI1t37BCsCD_jMVBEqQPUghbRmz3KMny540V-r5iYAHaJeGolUYdUE8o1QCok7HMxEzZHZGS9Q=s600-c-k-c0x00ffffff-no-rj-rp-mo";
  343. profilePicture.style =
  344. "width:60px;height:60px;border-radius:50%;cursor:pointer;";
  345. profilePicture.onclick = function () {
  346. window.location.href =
  347. "https://www.youtube.com/channel/UCub84Dy0SSA0NgCqeUdjpsA";
  348. };
  349. player.appendChild(profilePicture);
  350. var label = document.createElement("div");
  351. label.textContent = audioFiles[currentIndex].title;
  352. label.style = "margin-top:10px;text-align:center;";
  353. player.appendChild(label);
  354. var playButton = document.createElement("button");
  355. playButton.textContent = "Play";
  356. playButton.style =
  357. "margin-top:10px;width:100%;padding:10px;border:none;border-radius:5px;background-color:green;color:white;cursor:pointer;";
  358. playButton.onclick = function () {
  359. if (audio.paused) {
  360. audio.play();
  361. this.textContent = "Pause";
  362. this.style.background = "red";
  363. } else {
  364. audio.pause();
  365. this.textContent = "Play";
  366. this.style.background = "green";
  367. }
  368. };
  369. player.appendChild(playButton);
  370. var nextButton = document.createElement("button");
  371. nextButton.textContent = "Next";
  372. nextButton.style =
  373. "margin-top:10px;width:100%;padding:10px;border:none;border-radius:5px;background-color:white;color:black;cursor:pointer;";
  374. nextButton.onclick = playNext;
  375. player.appendChild(nextButton);
  376. var shuffleRepeatContainer = document.createElement("div");
  377. shuffleRepeatContainer.style =
  378. "display:flex;justify-content:space-between;width:100%;margin-top:10px;";
  379. player.appendChild(shuffleRepeatContainer);
  380. var shuffleButton = document.createElement("button");
  381. shuffleButton.textContent = "Shuffle: Off";
  382. shuffleButton.style =
  383. "padding:10px;border:none;border-radius:5px;background-color:black;color:white;cursor:pointer;width:48%;";
  384. shuffleButton.onclick = function () {
  385. shuffled = !shuffled;
  386. this.textContent = shuffled ? "Shuffle: On" : "Shuffle: Off";
  387. };
  388. shuffleRepeatContainer.appendChild(shuffleButton);
  389. var repeatButton = document.createElement("button");
  390. repeatButton.textContent = "Repeat: Off";
  391. repeatButton.style =
  392. "padding:10px;border:none;border-radius:5px;background-color:black;color:white;cursor:pointer;width:48%;";
  393. repeatButton.onclick = function () {
  394. repeat = !repeat;
  395. this.textContent = repeat ? "Repeat: On" : "Repeat: Off";
  396. };
  397. shuffleRepeatContainer.appendChild(repeatButton);
  398. var durationDisplay = document.createElement("div");
  399. durationDisplay.style = "margin-top:10px;text-align:center;";
  400. player.appendChild(durationDisplay);
  401. var trackList = document.createElement("div");
  402. trackList.style =
  403. "overflow:auto;max-height:150px;margin-top:20px;border:1px solid #fff;border-radius:10px;padding:5px;";
  404. audioFiles.forEach(function (track, index) {
  405. var trackButton = document.createElement("button");
  406. trackButton.textContent = track.title;
  407. trackButton.classList.add("track-button");
  408. trackButton.style =
  409. "padding:5px;border:none;border-radius:5px;background-color:black;color:white;cursor:pointer;width:100%;text-align:left;margin-top:5px;";
  410. trackButton.onclick = function () {
  411. currentIndex = index;
  412. audio.src = track.url;
  413. audio.play();
  414. label.textContent = track.title;
  415. playButton.textContent = "Pause";
  416. playButton.style.background = "red";
  417. trackButtons.forEach(function (trackButton, i) {
  418. if (i === currentIndex) {
  419. trackButton.classList.add("active");
  420. } else {
  421. trackButton.classList.remove("active");
  422. }
  423. });
  424. };
  425. trackList.appendChild(trackButton);
  426. });
  427. player.appendChild(trackList);
  428. var activeButtonStyle = document.createElement("style");
  429. activeButtonStyle.innerHTML = ".track-button.active{background-color:green;}";
  430. document.head.appendChild(activeButtonStyle);
  431. var madeByLabel = document.createElement("div");
  432. madeByLabel.textContent = "Made by Zod324myers";
  433. madeByLabel.style = "margin-top:auto;text-align:center;";
  434. player.appendChild(madeByLabel);
  435. document.body.appendChild(player);
  436. document.addEventListener("keydown", function (e) {
  437. if (e.key === "m" && document.activeElement.id.toLowerCase() !== "chatbox") {
  438. player.style.display = player.style.display === "none" ? "flex" : "none";
  439. }
  440. });
  441. })();
  442.  
  443. let lastPing = -1;
  444. let cvs = document.getElementById("gameCanvas"),
  445. ctx = cvs.getContext("2d");
  446. let Ie = document.getElementById("pingDisplay");
  447. Ie.replaceWith(document.createElement("div"));
  448. Ie.style.fontSize = "20px";
  449. Ie.style.fontFamily = "Calibri";
  450. Ie.style.display = "block";
  451. Ie.style.zIndex = "1";
  452. document.body.appendChild(Ie);
  453. setInterval(() => {
  454. Ie.style.display = "block";
  455. Ie.innerText = `${window.pingTime} ping | ${fps} fps`;
  456. }, 0);
  457. const times = [];
  458. let fps;
  459.  
  460. function refreshLoop() {
  461. window.requestAnimationFrame(() => {
  462. const now = performance.now();
  463. while (times.length > 0 && times[0] <= now - 1000) {
  464. times.shift();
  465. }
  466. times.push(now);
  467. fps = times.length;
  468. refreshLoop();
  469. });
  470. }
  471.  
  472. refreshLoop();
  473. Ie.style.fontSize = "20px";
  474. Ie.style.display = "block";
  475. Ie.style.color = "#fff";
  476. Ie.style.textShadow = "3px 3px 3px black";
  477. Ie.style.zIndex = "1";
  478. let anti = true;
  479. let hitBack = false;
  480. let stackInsta = false;
  481. let lastDamageTick = 0;
  482. let HP = 100;
  483. let gameTick = 0;
  484. var shame = 0;
  485. let shameTime,
  486. damageTimes = 0;
  487. let mouseX;
  488. let mouseY;
  489.  
  490. let width;
  491. let height;
  492. //autoaim1
  493. setInterval(() => {
  494. if (autoaim == true) {
  495. doNewSend(["D", [nearestEnemyAngle]]);
  496. }
  497. }, 10);
  498.  
  499. setInterval(() => {
  500. if (hatToggle == 1) {
  501. if (oldHat != normalHat) {
  502. hat(normalHat);
  503. console.log("Tried. - Hat")
  504. }
  505. if (oldAcc != normalAcc) {
  506. acc(normalAcc);
  507. console.log("Tried. - Acc")
  508. }
  509. oldHat = normalHat;
  510. oldAcc = normalAcc
  511. }
  512. }, 25);
  513.  
  514. setInterval(function () {
  515. if (myPlayer.hat == 45) {
  516. doNewSend(["6", ["I love you plz no kill *;::;*"]]);
  517. }
  518. }, 1980);// messages send ever 2000ms but this is incase of packet mashes
  519.  
  520. function normal() {
  521. hat(normalHat);
  522. acc(normalAcc);
  523. }
  524.  
  525. function aim(x, y) {
  526. var cvs = document.getElementById("gameCanvas");
  527. cvs.dispatchEvent(new MouseEvent("mousemove", {
  528. clientX: x,
  529. clientY: y
  530.  
  531. }));
  532. }
  533.  
  534. let coreURL = new URL(window.location.href);
  535. window.sessionStorage.force = coreURL.searchParams.get("fc");
  536.  
  537. var packet
  538. var nearestEnemy;
  539. var nearestEnemyAngle;
  540. var oppositeEnemyAngle;
  541. var enemyRan;
  542. let trap_a = null;
  543. let intrap = false;
  544. let trapid = null;
  545. var antitrap = false;
  546. var isEnemyNear;
  547. var primary;
  548. var secondary;
  549. var foodType;
  550. var wallType;
  551. var spikeType;
  552. var millType;
  553. var mineType;
  554. var boostType;
  555. var turretType;
  556. var spawnpadType;
  557. var autoaim = false;
  558. var autoprimary = false;
  559. var autosecondary = false;
  560. var tick = 1;
  561. var oldHat;
  562. var oldAcc;
  563. var enemiesNear;
  564. var normalHat;
  565. var normalAcc;
  566. var ws;
  567. var msgpack5 = msgpack;
  568. var boostDir;
  569. let myPlayer = {
  570. id: null,
  571. x: null,
  572. y: null,
  573. dir: null,
  574. object: null,
  575. weapon: null,
  576. clan: null,
  577. isLeader: null,
  578. hat: null,
  579. accessory: null,
  580. isSkull: null,
  581. };
  582.  
  583. let healSpeed = 100;
  584. var messageToggle = 0;
  585. var clanToggle = 0;
  586. let healToggle = 1;
  587. let hatToggle = 1;
  588. document.msgpack = msgpack;
  589.  
  590. function n() {
  591. this.buffer = new Uint8Array([0]);
  592. this.buffer.__proto__ = new Uint8Array;
  593. this.type = 0;
  594. }
  595.  
  596. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  597. WebSocket.prototype.send = function(m) {
  598. if (!ws) {
  599. document.ws = this;
  600.  
  601. ws = this;
  602. socketFound(this);
  603. }
  604. this.oldSend(m);
  605. };
  606.  
  607. /*function biomeHat() {
  608. if (myPlayer.y < 2400) {
  609. hat(6);
  610. } else {
  611. if (myPlayer.y > 6850 && myPlayer.y < 7550) {
  612. hat(6);
  613. } else {
  614. hat(6);
  615. }
  616. }
  617. //acc(11);
  618. }*/
  619.  
  620. function socketFound(socket) {
  621. socket.addEventListener('message', function(message) {
  622. handleMessage(message);
  623. });
  624. }
  625.  
  626. function handleMessage(m) {
  627. let temp = msgpack5.decode(new Uint8Array(m.data));
  628. let data;
  629. if (temp.length > 1) {
  630. data = [temp[0], ...temp[1]];
  631. if (data[1] instanceof Array) {
  632. data = data;
  633. }
  634. } else {
  635. data = temp;
  636. }
  637. let item = data[0];
  638. if (!data) {
  639. return
  640. };
  641.  
  642.  
  643. if (item === "io-init") {
  644. let cvs = document.getElementById("gameCanvas");
  645. width = cvs.clientWidth;
  646. height = cvs.clientHeight;
  647. $(window).resize(function() {
  648. width = cvs.clientWidth;
  649. height = cvs.clientHeight;
  650. });
  651. cvs.addEventListener("mousemove", e => {
  652. mouseX = e.clientX;
  653. mouseY = e.clientY;
  654. });
  655. }
  656.  
  657. if (item == "C" && myPlayer.id == null) {
  658. myPlayer.id = data[1];
  659. }
  660.  
  661. if (item == "a") {
  662. enemiesNear = [];
  663. for (let i = 0; i < data[1].length / 13; i++) {
  664. let playerInfo = data[1].slice(13 * i, 13 * i + 13);
  665. if (playerInfo[0] == myPlayer.id) {
  666. myPlayer.x = playerInfo[1];
  667. myPlayer.y = playerInfo[2];
  668. myPlayer.dir = playerInfo[3];
  669. myPlayer.object = playerInfo[4];
  670. myPlayer.weapon = playerInfo[5];
  671. myPlayer.clan = playerInfo[7];
  672. myPlayer.isLeader = playerInfo[8];
  673. myPlayer.hat = playerInfo[9];
  674. myPlayer.accessory = playerInfo[10];
  675. myPlayer.isSkull = playerInfo[11];
  676. } else if (playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
  677. enemiesNear.push(playerInfo);
  678. }
  679. }
  680. }
  681. update();
  682. if (item == "H") {
  683. for(let i = 0; i < data[1].length / 8; i++) {
  684. let info = data[1].slice(8*i, 8*i+8);
  685. if(info[6] == millType && info[7] == myPlayer.id){
  686. friendlyMillLocs.push(info)
  687. }
  688.  
  689. if(info[7] == myPlayer.id){
  690. onWeapon = true;
  691. }
  692. }
  693.  
  694. }
  695. update();
  696. /*if(item == "P"){
  697. setTimeout(() => {
  698. doNewSend(["M", [{name: "vn-" + "",moofoll: 1,skin: "#cc5151"}]]);
  699. }, 200);
  700. }*/
  701.  
  702. if(item == "Q"){
  703. removeArraysWithValue(friendlyMillLocs, data[1])
  704. }
  705. update();
  706. if(item == "R"){
  707. removeArraysWithValue(friendlyMillLocs, data[1])
  708. }
  709. update();
  710. if(item == "S"){
  711. if(data[1] == 3){
  712. millCount = data[2];
  713. }
  714. }
  715. update();
  716. if(friendlyMillLocs){
  717. nearestFriendlyMill = friendlyMillLocs.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
  718.  
  719. if(nearestFriendlyMill){
  720. nearestFriendlyMillX = nearestFriendlyMill[1]
  721. nearestFriendlyMillY = nearestFriendlyMill[2]
  722. nearestFriendlyMillScale = nearestFriendlyMill[4]
  723. }
  724. }
  725. if(Math.sqrt(Math.pow((myPlayer.y-nearestFriendlyMillY), 2) + Math.pow((myPlayer.x-nearestFriendlyMillX), 2)) < nearestFriendlyMillScale + 100) {
  726. console.log(true)
  727. isNextToFriendlyMill = true;
  728. } else {
  729. isNextToFriendlyMill = false;
  730. }
  731. WebSocket.prototype.send = function(m){
  732. let xcc = new Uint8Array(m);
  733. this.oldSend(m);
  734. let realData = {};
  735. let realInfo = msgpack5.decode(xcc);
  736. if (realInfo[1] instanceof Array){
  737. realData.data = [realInfo[0], ...realInfo[1]]
  738. }
  739. let rd0 = realData.data[0];
  740. let rd1 = realData.data[1];
  741. let rd2 = realData.data[2]
  742.  
  743. if(rd0 == 'a'){
  744. movementDirection = rd1
  745. }
  746. };
  747. isEnemyNear = false;
  748. if (enemiesNear) {
  749. nearestEnemy = enemiesNear.sort((a, b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
  750. }
  751.  
  752. if (nearestEnemy) {
  753. nearestEnemyAngle = Math.atan2(nearestEnemy[2] - myPlayer.y, nearestEnemy[1] - myPlayer.x);
  754. oppositeEnemyAngle = Math.atan2(nearestEnemy[2] + myPlayer.y, nearestEnemy[1] + myPlayer.x);
  755. enemyRan = Math.sqrt(Math.pow((myPlayer.y - nearestEnemy[2]), 2) + Math.pow((myPlayer.x - nearestEnemy[1]), 2));
  756. if (Math.sqrt(Math.pow((myPlayer.y - nearestEnemy[2]), 2) + Math.pow((myPlayer.x - nearestEnemy[1]), 2)) < 285) {
  757. isEnemyNear = true;
  758. if (autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
  759. normalHat = 6;
  760. if (primary != 8) {
  761. normalAcc = 21
  762. }
  763. };
  764. }
  765. }
  766. if (isEnemyNear == false && autoaim == false) {
  767. if (myPlayer.y < 2400) {
  768. normalHat = 15;
  769. } else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
  770. normalHat = 31;
  771. } else {
  772. normalHat = 12;
  773.  
  774. }
  775. }
  776. if(isEnemyNear == true && nearestEnemy[5] == 4 && nearestEnemy[9] == 7 && hitBack == true && myPlayer.hat != 7 && myPlayer.hat != 53 && myPlayer.hat != 22 && myPlayer.hat != 11){
  777. doNewSend(["c", [0, 11, 0]]);
  778. setTimeout(()=>{
  779. doNewSend(["c", [0, 21, 1]]);
  780. },60);
  781. }
  782. if (!nearestEnemy) {
  783. nearestEnemyAngle = myPlayer.dir;
  784. }
  785.  
  786. if (item == "X") {
  787. //this is Sync detector(beta)
  788. if (data[5] == 3.6) {
  789. let dir_1 = (dir) => Math.atan2(Math.sin(dir), Math.cos(dir));
  790. let a1 = dir_1(
  791. (Math.atan2(data[2] - myPlayer.y, data[1] - myPlayer.x) +
  792. Math.PI +
  793. Math.PI) %
  794. (Math.PI * 2)
  795. );
  796. let a2 = dir_1((dir_1(data[3]) + Math.PI) % (Math.PI * 2));
  797. let a3 = a1 - a2;
  798. if (0.36 > a3 && -0.36 < a3) {
  799. //doNewSend(["6", ["Sync Detect Test"]]);
  800. doNewSend(["D",[Math.atan2(data[2] - myPlayer.y, data[1] - myPlayer.x)],]);
  801. if (data[2] < 80 && data[2] > 0) {
  802. doNewSend(["c", [0, 6, 0]]);
  803. place(foodType);
  804. place(foodType);
  805. }
  806. }
  807. }
  808. }
  809. if (myPlayer.hat == 45 && shame) shameTime = 30000;
  810. if (myPlayer.hat == 45 && shame) shame = 30000;
  811. if (data[0] == "a") {
  812. gameTick++;
  813. }
  814. if (item == "O" && data[1] == myPlayer.id) {
  815. gameTick = 0;
  816. lastDamageTick = 0;
  817. shame = 0;
  818. HP = 100;
  819. shameTime = 0;
  820. if (item == "O" && data[1] == myPlayer.id) {
  821. let damage = HP - data[2];
  822. HP = data[2];
  823. if (damage <= -1) {
  824. damageTimes++;
  825. if (!lastDamageTick) return;
  826. let healTime = gameTick - lastDamageTick;
  827. lastDamageTick = 0;
  828. if (healTime <= 1) {
  829. shame = shame++;
  830. } else {
  831. shame = Math.max(0, shame - 2);
  832. }
  833. } else {
  834. lastDamageTick = gameTick;
  835. }
  836. }
  837. if (data[2] < 100 && data[2] > 0 && healToggle == true) {
  838. //normal heal
  839. console.log("normal healing");
  840. setTimeout(() => {
  841. place(foodType);
  842. place(foodType);
  843. doNewSend(["c", [0, 6, 0]]);
  844. // doNewSend(["6", ["Heal"]]);
  845. }, 115);
  846. }
  847. if (data[2] < 48 && data[2] > 0 && anti == true && (nearestEnemy[5] == 5 || nearestEnemy[5] == 3)) {
  848. healToggle = false;
  849. //antiinsta no sold for pol
  850. console.log("no soldier anti - polearm");
  851. doNewSend(["c", [0, 22, 0]]);
  852. //doNewSend(["6", ["Anti"]]);
  853. place(foodType);
  854. setTimeout(() => {
  855. place(foodType);
  856. doNewSend(["c", [0, 6, 0]]);
  857. healToggle = true;
  858. }, 200);
  859. setTimeout(() => {
  860. doNewSend(["c", [0, 7, 0]]);
  861. }, 700);
  862. setTimeout(() => {
  863. doNewSend(["c", [0, 6, 0]]);
  864. }, 1900);
  865. }
  866. if (data[2] < 62 && data[2] > 41 && anti == true && (nearestEnemy[5] == 5 || nearestEnemy[5] == 3)) {
  867. healToggle = false;
  868. //antiinsta for pol
  869. console.log("anti insta - polearm");
  870. doNewSend(["c", [0, 22, 0]]);
  871. //doNewSend(["6", ["Anti"]]);
  872. place(foodType);
  873. setTimeout(() => {
  874. place(foodType);
  875. doNewSend(["c", [0, 6, 0]]);
  876. healToggle = true;
  877. }, 200);
  878. setTimeout(() => {
  879. doNewSend(["c", [0, 7, 0]]);
  880. }, 700);
  881. setTimeout(() => {
  882. doNewSend(["c", [0, 6, 0]]);
  883. }, 1900);
  884. }
  885. if (data[2] < 56 && data[2] > 50) {
  886. healToggle = false;
  887. //bullspam heal
  888. console.log("anti bullspam");
  889. setTimeout(() => {
  890. place(foodType);
  891. place(foodType);
  892. doNewSend(["c", [0, 6, 0]]);
  893. //doNewSend(["6", ["BHeal1"]]);
  894. healToggle = true;
  895. }, 140);
  896. }
  897. if (data[2] < 41 && data[2] > 0 && hitBack == true && nearestEnemy[5] == 4) {
  898. console.log("hitbacking");
  899. healToggle = false;
  900. autoaim = true;
  901. setTimeout(() => {
  902. place(foodType);
  903. place(foodType);
  904. }, 133);
  905. place(spikeType, nearestEnemyAngle);
  906. doNewSend(["d", [1]]);
  907. doNewSend(["c", [0, 7, 0]]);
  908. doNewSend(["G", [primary, true]]);
  909. setTimeout(() => {
  910. doNewSend(["c", [0, 53, 0]]);
  911. doNewSend(["d", [0]]);
  912. healToggle = true;
  913. }, 150);
  914. setTimeout(() => {
  915. doNewSend(["c", [0, 11, 0]]);
  916. autoaim = false;
  917. }, 300);
  918. }
  919. }
  920. update();
  921. }
  922.  
  923. function doNewSend(sender) {
  924. ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
  925. }
  926.  
  927. function acc(id) {
  928. doNewSend(["c", [0, 0, 1]]);
  929. doNewSend(["c", [0, id, 1]]);
  930. }
  931.  
  932. function hat(id) {
  933. doNewSend(["c", [0, id, 0]]);
  934. }
  935.  
  936. function placeO(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
  937. doNewSend(["G", [myPlayer.weapon, true]]);
  938. doNewSend(["G", [id, null]]);
  939. doNewSend(["d", [1, angle]]);
  940. doNewSend(["d", [0, angle]]);
  941. doNewSend(["G", [myPlayer.weapon, true]]);
  942. }
  943.  
  944. function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
  945. doNewSend(["G", [id, null]]);
  946. doNewSend(["d", [1, angle]]);
  947. doNewSend(["d", [0, angle]]);
  948. doNewSend(["G", [myPlayer.weapon, true]]);
  949. }
  950.  
  951. var repeater = function(key, action, interval, bu) {
  952. let _isKeyDown = false;
  953. let _intervalId = undefined;
  954.  
  955. return {
  956. start(keycode) {
  957. if (keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  958. _isKeyDown = true;
  959. if (_intervalId === undefined) {
  960. _intervalId = setInterval(() => {
  961. action();
  962. if (!_isKeyDown) {
  963. clearInterval(_intervalId);
  964. _intervalId = undefined;
  965. console.log("claered");
  966. }
  967. }, interval);
  968. }
  969. }
  970. },
  971.  
  972. stop(keycode) {
  973. if (keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  974. _isKeyDown = false;
  975. }
  976. }
  977. };
  978.  
  979.  
  980. }
  981.  
  982. function removeArraysWithValue(arr, valueToRemove) {
  983. for (let i = arr.length - 1; i >= 0; i--) {
  984. const innerArray = arr[i];
  985. if (innerArray.includes(valueToRemove)) {
  986. arr.splice(i, 1);
  987. }
  988. }
  989. }
  990. let movementDirection
  991. let millCount = 0;
  992. let nearestRandomObjectX;
  993. let nearestRandomObjectY;
  994. let friendlyMillLocs = [];
  995. let nearestFriendlyMill;
  996. let nearestFriendlyMillX;
  997. let nearestFriendlyMillY;
  998. let nearestFriendlyMillScale;
  999. let isNextToFriendlyMill = false;
  1000. let automilling = false
  1001. let automill = false
  1002. setInterval(()=>{
  1003. if(automill == true && isNextToFriendlyMill == false && millCount < 298 && automilling == false){
  1004. automilling = true;
  1005. doNewSend(["G",[millType, null]])
  1006. doNewSend(["d",[1, (movementDirection - 1.90)]])
  1007. doNewSend(["d",[0, (movementDirection - 1.90)]])
  1008. doNewSend(["G",[myPlayer.weapon, true]])
  1009. doNewSend(["G",[millType, null]])
  1010. doNewSend(["d",[1, (movementDirection - 3.14)]])
  1011. doNewSend(["d",[0, (movementDirection - 3.14)]])
  1012. doNewSend(["G",[myPlayer.weapon, true]])
  1013. doNewSend(["G",[millType, null]])
  1014. doNewSend(["d",[1, (movementDirection + 1.90)]])
  1015. doNewSend(["d",[0, (movementDirection + 1.90)]])
  1016. doNewSend(["G",[myPlayer.weapon, true]])
  1017. automilling = false
  1018. }
  1019. }, 100)
  1020. const boostPlacer = repeater(70,() => {place(boostType);},50);
  1021. const spikePlacer = repeater(86,() => {place(spikeType);},50);
  1022. const placers = [boostPlacer, spikePlacer];
  1023. let prevCount = 0;
  1024. const handleMutations = (mutationsList) => {
  1025. for (const mutation of mutationsList) {
  1026. if (mutation.target.id === "killCounter") {
  1027. const count = parseInt(mutation.target.innerText, 10) || 0;
  1028. if (count > prevCount) {
  1029. doNewSend(["6", ["+1 kill"]]);
  1030. setTimeout(()=>{
  1031. doNewSend(["6", ["1+ Noob Down The Drain..."]]);
  1032. },650);
  1033. prevCount = count;
  1034. }
  1035. }
  1036. }
  1037. };
  1038.  
  1039.  
  1040. const observer = new MutationObserver(handleMutations);
  1041. observer.observe(document, {
  1042. subtree: true,
  1043. childList: true,
  1044. });
  1045.  
  1046. document.addEventListener('keydown', (e) => {
  1047. if (["allianceinput", "chatbox", "nameinput", "storeHolder"].includes(document.activeElement.id.toLowerCase()))
  1048. return null;
  1049. placers.forEach((t) => {
  1050. t.start(e.keyCode);
  1051. });
  1052.  
  1053. if (e.keyCode == 78 && document.activeElement.id.toLowerCase() !== "chatbox") {// N = Automill
  1054. automill = !automill;
  1055. }
  1056.  
  1057. if(e.keyCode == 16 && document.activeElement.id.toLowerCase() !== 'chatbox'){// H = Turret/Teleporter
  1058. doNewSend(["c", [0, 6, 0]]);
  1059. }
  1060.  
  1061. if(e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox'){// H = Turret/Teleporter
  1062. place(turretType, myPlayer.dir + toRad(45));
  1063. place(turretType, myPlayer.dir - toRad(45));
  1064. }
  1065. /* if (e.keyCode == 16) {
  1066. biomeHat();
  1067. }*/
  1068. if (e.keyCode == 32 && document.activeElement.id.toLowerCase() !== "chatbox") {
  1069. // spiketick
  1070. autoaim = true;
  1071. console.log("spiektick");
  1072. place(spikeType, nearestEnemyAngle);
  1073. doNewSend(["d", [1]]);
  1074. doNewSend(["c", [0, 7, 0]]);
  1075. doNewSend(["G", [primary, true]]);
  1076. doNewSend(["d", [1]]);
  1077. setTimeout(() => {
  1078. doNewSend(["c", [0, 6, 0]]);
  1079. doNewSend(["d", [0]]);
  1080. autoaim = false;
  1081. }, 400);
  1082. }
  1083. if (e.keyCode == 89 && document.activeElement.id.toLowerCase() !== "chatbox") {//diamond pol 1 tick
  1084. autoaim = true;
  1085. doNewSend(["G", [primary, true]]);
  1086. doNewSend(["c", [0, 53, 0]]);
  1087. setTimeout(() => {
  1088. doNewSend(["c", [0, 7, 0]]);
  1089. doNewSend(["d", [1]]);
  1090. }, 100);
  1091. setTimeout(() => {
  1092. doNewSend(["G", [primary, true]]);
  1093. doNewSend(["c", [0, 6, 0]]);
  1094. doNewSend(["d", [0]]);
  1095. autoaim = false;
  1096. }, 500);
  1097. }
  1098. if (e.keyCode == 82 &&document.activeElement.id.toLowerCase() !== "chatbox") {
  1099. if (stackInsta == false) {
  1100. console.log("normal insta");
  1101. autoaim = true;
  1102. doNewSend(["c", [0, 7, 0]]);
  1103. doNewSend(["G", [primary, true]]);
  1104. doNewSend(["c", [0, 0, 1]])
  1105. doNewSend(["d", [1]]);
  1106. acc(18)
  1107. doNewSend(["c", [1]]);
  1108. setTimeout(() => {
  1109. doNewSend(["G", [secondary, true]]);
  1110. doNewSend(["c", [0, 53, 0]]);
  1111. doNewSend(["c", [0, 0, 1]]);
  1112. acc(21)
  1113. }, 105);
  1114. setTimeout(() => {
  1115. doNewSend(["G", [secondary, true]]);
  1116. }, 110);
  1117. setTimeout(() => {
  1118. doNewSend(["G", [secondary, true]]);
  1119. }, 115);
  1120. setTimeout(() => {
  1121. doNewSend(["G", [primary, true]]);
  1122. doNewSend(["d", [0, null]]);
  1123. doNewSend(["c", [0, 6, 0]]);
  1124. doNewSend(["c", [0, 0, 0]]);
  1125. doNewSend(["c", [0, 0, 1]]);
  1126. hat(6)
  1127. acc(21)
  1128. autoaim = false;
  1129. }, 215);
  1130. } else {
  1131. console.log("stack insta");
  1132. autoaim = true;
  1133. doNewSend(["c", [0, 7, 0]]);
  1134. doNewSend(["G", [primary, true]]);
  1135. doNewSend(["c", [0, 0, 1]])
  1136. doNewSend(["d", [1]]);
  1137. acc(18)
  1138. doNewSend(["c", [1]]);
  1139. setTimeout( () => {
  1140. var sck = "";
  1141. doNewSend(["G", [secondary, true]]);
  1142. doNewSend(["c", [0, 53, 0]]);
  1143. doNewSend(["c", [0, 0, 1]]);
  1144. for(let i = 0; i < 850; i++){
  1145. let caas = new Uint8Array(550);
  1146. for(let i = 0; i <caas.length;i++){
  1147. caas[i] = Math.floor(Math.random()*270);
  1148. sck += caas[i]
  1149. }
  1150. }
  1151. ws.send(caas);
  1152. }, 105);
  1153. setTimeout(() => {
  1154. doNewSend(["G", [secondary, true]]);
  1155. }, 200);
  1156. setTimeout(() => {
  1157. doNewSend(["G", [primary, true]]);
  1158. doNewSend(["d", [0, null]]);
  1159. doNewSend(["c", [0, 6, 0]]);
  1160. doNewSend(["c", [0, 0, 0]]);
  1161. doNewSend(["c", [0, 0, 1]]);
  1162. hat(6)
  1163. acc(21)
  1164. autoaim = false;
  1165. }, 215);
  1166. }
  1167. }
  1168. if (e.keyCode == 188 &&document.activeElement.id.toLowerCase() !== "chatbox") {
  1169. console.log("boost tick");
  1170. autoaim = true;
  1171. setTimeout(()=>{
  1172. doNewSend(["d", [1]]);
  1173. doNewSend(["G", [secondary, true]]);
  1174. },99);
  1175. setTimeout(()=>{
  1176. doNewSend(["c", [0, 53, 0]]);
  1177. place(boostType);
  1178. },50);
  1179. setTimeout(() => {
  1180. doNewSend(["G", [primary, true]]);
  1181. doNewSend(["c", [0, 7, 0]]);
  1182. doNewSend(["d", [1]]);
  1183. doNewSend(["d", [0]]);
  1184. }, 175);
  1185. setTimeout(() => {
  1186. doNewSend(["G", [primary, true]]);
  1187. doNewSend(["c", [0, 6, 0]]);
  1188. doNewSend(["d", [0]]);
  1189. autoaim = false;
  1190. }, 500);
  1191. }
  1192. if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== "chatbox") {
  1193. if(stackInsta == false){
  1194. // insta
  1195. autoaim = true;
  1196. console.log("reverse insta");
  1197. doNewSend(["d", [1]]);
  1198. doNewSend(["G", [secondary, true]]);
  1199. doNewSend(["c", [0, 53, 0]]);
  1200. setTimeout(() => {
  1201. doNewSend(["G", [primary, true]]);
  1202. doNewSend(["c", [0, 7, 0]]);
  1203. doNewSend(["d", [1]]);
  1204. doNewSend(["d", [0]]);
  1205. }, 80);
  1206. setTimeout(() => {
  1207. doNewSend(["G", [primary, true]]);
  1208. doNewSend(["c", [0, 6, 0]]);
  1209. doNewSend(["d", [0]]);
  1210. autoaim = false;
  1211. }, 500);
  1212. } else {
  1213. autoaim = true;
  1214. console.log("stacked reverse insta");
  1215. doNewSend(["d", [1]]);
  1216. doNewSend(["G", [secondary, true]]);
  1217. doNewSend(["c", [0, 53, 0]]);
  1218. setTimeout(() => {
  1219. var sck = "";
  1220. doNewSend(["G", [primary, true]]);
  1221. doNewSend(["c", [0, 7, 0]]);
  1222. doNewSend(["d", [1]]);
  1223. doNewSend(["d", [0]]);
  1224. for(let i = 0; i < 850; i++){
  1225. let caas = new Uint8Array(550);
  1226. for(let i = 0; i <caas.length;i++){
  1227. caas[i] = Math.floor(Math.random()*270);
  1228. sck += caas[i]
  1229. }
  1230. }
  1231. ws.send(caas);
  1232. }, 80);
  1233. setTimeout(() => {
  1234. doNewSend(["G", [primary, true]]);
  1235. doNewSend(["c", [0, 6, 0]]);
  1236. doNewSend(["d", [0]]);
  1237. autoaim = false;
  1238. }, 500);
  1239. }
  1240. }
  1241. if (e.keyCode == 66 &&document.activeElement.id.toLowerCase() !== "chatbox") {//manual bulltick
  1242. doNewSend(["c", [0, 7, 0]]);
  1243. setTimeout(()=>{
  1244. doNewSend(["c", [0, 13, 1]]);
  1245. },60);
  1246. }
  1247. })
  1248.  
  1249. document.addEventListener('keyup', (e) => {
  1250. if (["allianceinput", "chatbox", "nameinput", "storeHolder"].includes(document.activeElement.id.toLowerCase()))
  1251. return null;
  1252. placers.forEach((t) => {
  1253. t.stop(e.keyCode);
  1254. })
  1255. })
  1256.  
  1257. document.addEventListener("mousedown", (event) => {
  1258. if (event.button == 2 && secondary != 10) {
  1259. doNewSend(["d", [1]]);
  1260. doNewSend(["c", [0, 40, 0]]);
  1261. doNewSend(["G", [primary, true]]);
  1262. setTimeout(()=>{
  1263. doNewSend(["d", [0]]);
  1264. doNewSend(["c", [0, 6, 0]]);
  1265. },100);
  1266. } else if (event.button == 2) {
  1267. doNewSend(["d", [1]]);
  1268. doNewSend(["c", [0, 40, 0]]);
  1269. doNewSend(["G", [secondary, true]]);
  1270. setTimeout(()=>{
  1271. doNewSend(["d", [0]]);
  1272. doNewSend(["c", [0, 6, 0]]);
  1273. },100);
  1274. }
  1275. });
  1276.  
  1277. /*document.addEventListener("mousedown", (event) => {
  1278. if (event.button == 0) {
  1279. doNewSend(["d", [1]]);
  1280. doNewSend(["c", [0, 7, 0]]);
  1281. doNewSend(["G", [primary, true]]);
  1282. setTimeout(()=>{
  1283. doNewSend(["d", [0]]);
  1284. doNewSend(["c", [0, 6, 0]]);
  1285. },100);
  1286. }
  1287. });*/
  1288.  
  1289. function isElementVisible(e) {
  1290. return (e.offsetParent !== null);
  1291. }
  1292.  
  1293. function toRad(angle) {
  1294. return angle * 0.01745329251;
  1295. }
  1296.  
  1297. function dist(a, b) {
  1298. return Math.sqrt(Math.pow((b.y - a[2]), 2) + Math.pow((b.x - a[1]), 2));
  1299. }
  1300.  
  1301. function update() {
  1302. for (let i = 0; i < 9; i++) {
  1303. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1304. primary = i;
  1305. }
  1306. }
  1307.  
  1308. for (let i = 9; i < 16; i++) {
  1309. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1310. secondary = i;
  1311. }
  1312. }
  1313.  
  1314. for (let i = 16; i < 19; i++) {
  1315. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1316. foodType = i - 16;
  1317. }
  1318. }
  1319.  
  1320. for (let i = 19; i < 22; i++) {
  1321. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1322. wallType = i - 16;
  1323. }
  1324. }
  1325.  
  1326. for (let i = 22; i < 26; i++) {
  1327. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1328. spikeType = i - 16;
  1329. }
  1330. }
  1331.  
  1332. for (let i = 26; i < 29; i++) {
  1333. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1334. millType = i - 16;
  1335. }
  1336. }
  1337.  
  1338. for (let i = 29; i < 31; i++) {
  1339. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1340. mineType = i - 16;
  1341. }
  1342. }
  1343.  
  1344. for (let i = 31; i < 33; i++) {
  1345. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  1346. boostType = i - 16;
  1347. }
  1348. }
  1349.  
  1350. for (let i = 33; i < 39; i++) {
  1351. if (isElementVisible(document.getElementById("actionBarItem" + i.toString())) && i != 36) {
  1352. turretType = i - 16;
  1353. }
  1354. }
  1355.  
  1356. spawnpadType = 36;
  1357. }
  1358.  
  1359. var styleItem = document.createElement("style");
  1360. styleItem.type = "text/css";
  1361. styleItem.appendChild(document.createTextNode(`
  1362. .loader {
  1363. position: absolute;
  1364. top:110%;
  1365. left:46%;
  1366. border: 16px solid #333;
  1367. border-radius: 50%;
  1368. border-top: 16px solid #181818;
  1369. box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.4);
  1370. width: 60px;
  1371. height: 60px;
  1372. -webkit-animation: spin 0.5s linear infinite; /* Safari */
  1373. animation: spin 0.5s linear infinite;
  1374. }
  1375. @-webkit-keyframes spin {
  1376. 0% { -webkit-transform: rotate(0deg); }
  1377. 100% { -webkit-transform: rotate(360deg); }
  1378. }
  1379.  
  1380. @keyframes spin {
  1381. 0% { transform: rotate(0deg); }
  1382. 100% { transform: rotate(360deg); }
  1383. }
  1384. #gameUI .joinAlBtn, a {
  1385. animation: 5s infinite linear both normal rainbow;
  1386. }
  1387.  
  1388. @keyframes rainbow {
  1389. 0% { filter: hue-rotate(0deg) }
  1390. 100% { filter: hue-rotate(360deg) }
  1391. }`));
  1392. document.head.appendChild(styleItem);
  1393.  
  1394. window.addEventListener("load", () => {
  1395.  
  1396. let toggleRender = true;
  1397. let canvas = document.getElementById("gameCanvas");
  1398. let ctx = canvas.getContext("2d");
  1399. let screenWidth = 1920;
  1400. let screenHeight = 1080;
  1401. let screenW = screenWidth / 2;
  1402. let screenH = screenHeight / 2;
  1403.  
  1404. function render() {
  1405.  
  1406. if (toggleRender) {
  1407.  
  1408. ctx.beginPath();
  1409.  
  1410. let gradient = ctx.createRadialGradient(screenW, screenH, 0, screenW, screenH, screenWidth);
  1411. for (let i = 0; i <= 1; i++) {
  1412. gradient.addColorStop(i, "rgba(0, 0, 0, " + i + ")");
  1413. }
  1414.  
  1415. ctx.fillStyle = gradient;
  1416. ctx.rect(0, 0, screenWidth, screenHeight);
  1417. ctx.fill();
  1418.  
  1419. }
  1420.  
  1421. window.requestAnimFrame(render);
  1422.  
  1423. }
  1424.  
  1425. render();
  1426. });
  1427.  
  1428. document.addEventListener("keydown", function (e) {
  1429. if (e.keyCode == 27) {
  1430. $('#infomenu').toggle();
  1431. ext = !ext;
  1432. };
  1433. });
  1434.  
  1435. // Menu
  1436. $("body").after(`
  1437. <div id="infomenu">
  1438. <hr>
  1439. <div class="nameblock">BESTMODEVER v1.75</div>
  1440. <hr>
  1441. <ul>
  1442. <li></label><label><div class="text">AntiInsta<input type="checkbox" id="anti" checked><span class="checkmark"></div></li>
  1443. <li></label><label><div class="text">HitBack<input type="checkbox" id="hitBack"><span class="checkmark"></div></li>
  1444. <li></label><label><div class="text">Stacked Insta<input type="checkbox" id="stackInsta"><span class="checkmark"></div></li>
  1445. </ul>
  1446. <hr>
  1447. <div class="nameblock">Controls:</div>
  1448. <hr>
  1449.  
  1450. <div class="text">
  1451. </li>
  1452. <li> N - Auto Triple Mill
  1453. </li>
  1454. <li> V - Spike
  1455. </li>
  1456. <li> F - Trap
  1457. </li>
  1458. <li> H - Double Turrets
  1459. </li>
  1460. <li> M - Music Menu
  1461. </li>
  1462. <li> Space - Perfect Stacked Spiketick
  1463. </li>
  1464. <li> RightClick - AutoBreaker
  1465. </li>
  1466. <li> R - Normal Instakill
  1467. </li>
  1468. <li> T - Reverse Instakill
  1469. </li>
  1470. <li> Y - OneTick
  1471. </li>
  1472. <li> , - Boost OneTick
  1473. </li>
  1474. <li> B - Bulltick
  1475. </li>
  1476. <li> Esc - Menu
  1477. </li>
  1478. </ul>
  1479. <hr>
  1480. </div>
  1481.  
  1482.  
  1483.  
  1484. </div>
  1485. <style>
  1486. button:active,
  1487. button:focus {
  1488. outline: none !important;
  1489. }
  1490. button::-moz-focus-inner {
  1491. border: 0 !important;
  1492. }
  1493. .nameblock {
  1494. font-size: 20px;
  1495. color: #dbdbdb;
  1496. text-align: center;
  1497. }
  1498. li {
  1499. font-size: 13px;
  1500. }
  1501. .text {
  1502. display: block;
  1503. font-size: 17px;
  1504. color: #fff;
  1505. text-align: left;
  1506. }
  1507. .menuToggle:hover{
  1508. cursor: pointer;
  1509. position: absolute;
  1510. background: linear-gradient(to right, red, orange, yellow, green, cyan, blue, violet);
  1511. background-size: 400% 400%;
  1512. -webkit-background-clip: text;
  1513. -webkit-text-fill-color: transparent;
  1514. -webkit-animation: colorR 20s ease infinite;
  1515. animation: colorR 20s ease infinite;
  1516. font-family: "Hammersmith One";
  1517. display: block !important;
  1518. top: 80px;
  1519. left: 1517px;
  1520. font-size: 17px;
  1521. }
  1522. .menuToggle{
  1523. cursor: pointer;
  1524. position: absolute;
  1525. background: linear-gradient(to right, gray, black);
  1526. background-size: 400% 400%;
  1527. -webkit-background-clip: text;
  1528. -webkit-text-fill-color: transparent;
  1529. -webkit-animation: colorR 20s ease infinite;
  1530. animation: colorR 20s ease infinite;
  1531. font-family: "Hammersmith One";
  1532. display: block !important;
  1533. top: 80px;
  1534. left: 1517px;
  1535. font-size: 17px;
  1536. }
  1537. ::-webkit-scrollbar { width: 5px; height: 3px;}
  1538. ::-webkit-scrollbar-button { background-color: #000000; }
  1539. ::-webkit-scrollbar-track { background-color: #999;}
  1540. ::-webkit-scrollbar-track-piece { background-color: rgba(0, 0, 0, 0.50);}
  1541. ::-webkit-scrollbar-thumb { height: 50px; background-color: #666; border-radius: 3px;}
  1542. ::-webkit-scrollbar-corner { background-color: #999;}}
  1543. ::-webkit-resizer { background-color: #666;}
  1544. #infomenu {
  1545. overflow-y: scroll;
  1546. overflow-x: hidden;
  1547. padding: 20px;
  1548. position: absolute;
  1549. display: none;
  1550. background: rgba(102, 102, 102, 0.25);
  1551. width: 310px;
  1552. height: 450px;
  1553. border: 2px solid black;
  1554. border-radius: 4px;
  1555. top: 80px;
  1556. left: 20px;
  1557. z-index: 1;
  1558. }
  1559. input {outline: 0 !important;}
  1560. .Input_Text_style, .Input_Buttob_style {
  1561. background: rgba(102, 102, 102);
  1562. border: 2px solid black;
  1563. border-radius: 10px;
  1564. color: #fff;
  1565. -o-transition: all 1s ease;
  1566. -ms-transition: all 1s ease;
  1567. -moz-transition: all 1s ease;
  1568. -webkit-transition: all 1s ease;
  1569. transition: all 1s ease;
  1570. }
  1571. .Input_Text_style:focus,.Input_Buttob_style:focus {
  1572. border: 2px solid #fff;
  1573. }
  1574. </style>
  1575. <script>
  1576. function InfoMenu() {
  1577. $("#infomenu").css({
  1578. "display" : "block"
  1579. });
  1580. }
  1581.  
  1582. /*(function() {
  1583. var UPDATE_DELAY = 700;
  1584. var lastUpdate = 0;
  1585. var frames = 0;
  1586. var values;
  1587. function updateCounter() {
  1588. var now = Date.now();
  1589. var elapsed = now - lastUpdate;
  1590. if (elapsed < UPDATE_DELAY) {
  1591. ++frames;
  1592. } else {
  1593. var fps = Math.round(frames / (elapsed / 1000));
  1594. document.getElementById("fps").textContent ="Fps: " + fps ;
  1595. frames = 0;
  1596. lastUpdate = now;
  1597. }
  1598. requestAnimationFrame(updateCounter);
  1599. }
  1600. lastUpdate = Date.now();
  1601. requestAnimationFrame(updateCounter);
  1602. })();
  1603. setInterval(()=>{
  1604. document.getElementById("ping").textContent = "Ping: " + window.pingTime;
  1605. },0);*/
  1606.  
  1607. </script>
  1608. `);
  1609. $("body").after(`
  1610. <div id="ShowMenu">
  1611. </span>
  1612. <div id="addtext">LeftAndRightClick: On</div>
  1613. <div id="addtext3">Balant macros: On</div>
  1614. <div id="addtext0">Soldier-Q: On</div>
  1615. <div id="addtext4">AutoSpawn: On</div>
  1616. <div id="addtext1">Left-Click</div>
  1617. <div id="addtext2">Right-Click</div>
  1618. <style>
  1619. #ShowMenu {
  1620. position:absolute !important;
  1621. display:block;
  1622. top: 5px;
  1623. left: 5px;
  1624. width: auto;
  1625. height: auto;
  1626. text-align: center;
  1627. }
  1628. #addtext,#addtext1,#addtext2,#addtext0,#addtext3,#addtext4{
  1629. display: none;
  1630. color: #fff;
  1631. background: linear-gradient(to right, red, orange, yellow, green, cyan, blue, violet);
  1632. background-size: 400% 400%;
  1633. font-size: 20px;
  1634. -webkit-background-clip: text;
  1635. -webkit-text-fill-color: transparent;
  1636. -webkit-animation: colorR 20s ease infinite;
  1637. animation: colorR 20s ease infinite;
  1638. }
  1639. @-webkit-keyframes colorR {
  1640. 0% { background-position: 0% 50% }
  1641. 50% { background-position: 100% 50% }
  1642. 100% { background-position: 0% 50% }
  1643. }
  1644. @keyframes colorR {
  1645. 0% { background-position: 0% 50% }
  1646. 50% { background-position: 100% 50% }
  1647. 100% { background-position: 0% 50% }
  1648. }
  1649. </style>
  1650. <script>
  1651. </script>
  1652. `);
  1653.  
  1654. var antii = document.querySelector("#anti")
  1655. antii.addEventListener('change', function() {
  1656. if (this.checked) {
  1657. anti = true;
  1658. } else {
  1659. anti = false;
  1660. }
  1661. });
  1662. var hitBackk = document.querySelector("#hitBack")
  1663. hitBackk.addEventListener('change', function() {
  1664. if (this.checked) {
  1665. hitBack = true;
  1666. } else {
  1667. hitBack = false;
  1668. }
  1669. });
  1670. var stackInstaa = document.querySelector("#stackInsta")
  1671. stackInstaa.addEventListener('change', function() {
  1672. if (this.checked) {
  1673. stackInsta = true;
  1674. } else {
  1675. stackInsta = false;
  1676. }
  1677. });