AE86

Ae86 says vroom

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