Moo Mod

Ez Kills

目前為 2024-03-09 提交的版本,檢視 最新版本

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