🏠 Home 

VN Mod v2 BY BLUCKGUY EZEZEZEZEZZZZZZZZZZZ

Revolver killer


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