EZ HACK MOD by EZ HACK v 1.5 Beta

A mod suitable for professionals only, not automatic, only automatic healing.

  1. // ==UserScript==
  2. // @name EZ HACK MOD by EZ HACK v 1.5 Beta
  3. // @namespace no
  4. // @license MIT
  5. // @version 1.5
  6. // @author EZ HACK
  7. // @description A mod suitable for professionals only, not automatic, only automatic healing.
  8. // @match *://*.moomoo.io/*
  9. // @match *://dev.moomoo.io/*
  10. // @match *://sandbox.moomoo.io/*
  11. // @require https://gf.qytechs.cn/scripts/478839-moomoo-io-packet-code/code/MooMooio%20Packet%20Code.js
  12. // @require https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js
  13. // @require https://gf.qytechs.cn/scripts/423602-msgpack/code/msgpack.js
  14. // @grant none
  15. // @icon https://i.imgur.com/Q7vI76D.png
  16. // @downloadURL
  17. // ==/UserScript==
  18. /*
  19. Key code :
  20. R__insta kill
  21. T__revers insta
  22. F__trap
  23. V__spieks
  24. O__4 spieaks
  25. C__no hat
  26. N__auto 3 mill
  27. G__ boster hat / wanter cap / Fish hat
  28. H__ 2 turret
  29. E__tank gear / solder helmet If you have a problem with the E button, press the number zero
  30. 0-zero__tank gear / solder helmet
  31. Q __speed auto heal
  32. U__store Menu
  33. Y__alliance Menu
  34. L__on / off funy
  35. CLICK FORWARD__ tank gear / solder helmet
  36. Right click__ nice DMG
  37. Space__1 spieks + DMG
  38. Shift__solder helmet
  39. Click scroll wheel__ 4 trap
  40. INSERT__Hide accessories
  41. B__chat(turret pls)
  42. M__chat(fuck Israel)
  43. */
  44. (function() {
  45. "use strict"
  46.  
  47. const adSelectors = [
  48. "#adCard", "#adBlock", "#promoImgHolder",
  49. "#pre-content-container"
  50. ]
  51. const meaninglessSelectors = [
  52. "#joinPartyButton", "#partyButton", "#settingsButton",
  53. `script[src="./libs/howler.core.min.js"]`, "#errorNotification",
  54. "#youtubeFollow", "#linksContainer2", "#twitterFollow",
  55. "#followText", "#youtuberOf", "#mobileInstructions",
  56. "#downloadButtonContainer", "#mobileDownloadButtonContainer", ".downloadBadge",
  57. "#altServer"
  58. ]
  59. const stateColors = {
  60. enabled: "#7ee559",
  61. disabled: "#e55959"
  62. }
  63.  
  64. function removeElement(selector) {
  65. const elements = [ ...document.querySelectorAll(selector) ]
  66.  
  67. for (const element of elements) {
  68. if (!element) continue
  69.  
  70. if (!(element.remove instanceof Function)) {
  71. element.style.display = "none !important"
  72. element.style.visiblity = "hidden !important"
  73.  
  74. continue
  75. }
  76.  
  77. element.remove()
  78. }
  79. }
  80.  
  81. function removeElements(selectors) {
  82. for (const selector of selectors) {
  83. if (!selector) continue
  84.  
  85. removeElement(selector)
  86. }
  87. }
  88.  
  89. function getCustomId(id) {
  90. id = id.toLowerCase().replace(/(\-|\s)/g, "_")
  91.  
  92. return `beta_adapter_${id}`
  93. }
  94.  
  95. function getGameDefaultButton(id) {
  96. const button = document.createElement("div")
  97.  
  98. button.classList.add("menuButton")
  99.  
  100. button.id = id
  101.  
  102. return button
  103. }
  104.  
  105. function addButtonToSetupCard(name, state, listener) {
  106. const setupCard = document.getElementById("setupCard")
  107. const id = getCustomId(name)
  108. const button = getGameDefaultButton(id)
  109.  
  110. button.innerHTML = `<span>${name}</span>`
  111. button.style.marginTop = "16px"
  112.  
  113. setupCard.appendChild(button)
  114.  
  115. button.setState = function(_state) {
  116. const stateColor = stateColors[_state ? "enabled" : "disabled"]
  117.  
  118. button.style.backgroundColor = stateColor
  119. }
  120.  
  121. button.setState(state)
  122.  
  123. if (!(listener instanceof Function)) return
  124.  
  125. button.addEventListener("click", listener.bind(null, button))
  126. }
  127.  
  128. function getRemoveStoreHatsState() {
  129. return JSON.parse(localStorage.getItem("remove_store_hats"))
  130. }
  131.  
  132. function setRemoveStoreHatsState(_state) {
  133. localStorage.setItem("remove_store_hats", JSON.stringify(_state))
  134. }
  135.  
  136. function onDOMLoaded() {
  137. removeElements(adSelectors)
  138. removeElements(meaninglessSelectors)
  139.  
  140. addButtonToSetupCard("Remove store hats", getRemoveStoreHatsState(), (button) => {
  141. const state = !getRemoveStoreHatsState()
  142.  
  143. button.setState(state)
  144. setRemoveStoreHatsState(state)
  145. })
  146.  
  147. const storeButton = document.getElementById("storeButton")
  148. const storeTabs = document.querySelectorAll(".storeTab")
  149. const removeHatsButtons = [ storeButton, ...storeTabs ]
  150.  
  151. removeHatsButtons.forEach((button) => {
  152. button.addEventListener("click", () => {
  153. if (!getRemoveStoreHatsState()) return
  154.  
  155. const interval = setInterval(() => {
  156. const mainMenu = document.getElementById("mainMenu")
  157. const hatPreview = document.querySelector(".hatPreview")
  158.  
  159. if (mainMenu) return clearInterval(interval)
  160. if (!hatPreview) return
  161.  
  162. removeElement(".hatPreview")
  163. clearInterval(interval)
  164. })
  165. })
  166. })
  167. }
  168.  
  169. window.location.native_resolution = true
  170.  
  171. const oldReqAnimFrame = window.requestAnimationFrame
  172.  
  173. window.requestAnimationFrame = function(callback) {
  174. if (callback.toString().length === 69) {
  175. return window.setTimeout(callback, 1e3 / 111)
  176. }
  177.  
  178. return oldReqAnimFrame(callback)
  179. }
  180.  
  181. Object.defineProperty(HTMLImageElement.prototype, "src", {
  182. get() {
  183. return this[Symbol("src")]
  184. },
  185. set(value) {
  186. if (this.classList.contains("hatPreview")) {
  187. if (getRemoveStoreHatsState() && (/\/hats\/hat\_/.test(value) || /\/accessories\/access\_/.test(value))) {
  188. return this.remove()
  189. }
  190. }
  191.  
  192. this.setAttribute("src", value)
  193.  
  194. this[Symbol("src")] = value
  195. },
  196. configurable: true
  197. })
  198.  
  199. Object.defineProperty(Object.prototype, "turnSpeed", {
  200. get() {
  201. return 0
  202. },
  203. set(value) {
  204. this[Symbol("turnSpeed")] = 0
  205. },
  206. configurable: true
  207. })
  208.  
  209. const maxScreenWidth = 1920
  210. const maxScreenHeight = 1080
  211. const { lineTo, moveTo } = CanvasRenderingContext2D.prototype
  212. const gridAlpha = 0.06
  213.  
  214. CanvasRenderingContext2D.prototype.moveTo = function(x, y) {
  215. if (this.globalAlpha === gridAlpha) return
  216.  
  217. return moveTo.apply(this, arguments)
  218. }
  219.  
  220. CanvasRenderingContext2D.prototype.lineTo = function(x, y) {
  221. if (this.globalAlpha === gridAlpha && (y === maxScreenHeight || x === maxScreenWidth)) return
  222.  
  223. return lineTo.apply(this, arguments)
  224. }
  225.  
  226. window.addEventListener("DOMContentLoaded", onDOMLoaded)
  227. })()
  228. const PASSWORD = "EZ HACK MOD";
  229. let password = prompt("Enter Your Password!");
  230. while (password !== PASSWORD) {
  231. alert("LOL");
  232. password = prompt("Enter Password");
  233. }
  234. document.getElementById('enterGame').innerText = "⇏ ‍ ‍ Enter_game. ‍ ‍ ‍⇍";
  235. document.getElementById("enterGame").addEventListener("mouseenter", function() {
  236. document.getElementById('enterGame').innerText = "⇏ Enter_game. ‍⇍";
  237. });
  238. document.getElementById("enterGame").addEventListener("mouseleave", function() {
  239. document.getElementById('enterGame').innerText = "⇏ ‍ ‍ Enter_game. ‍ ‍ ‍⇍";
  240. });
  241. $('#itemInfoHolder').css({
  242. 'text-align': 'center',
  243. 'top': '25px',
  244. 'left': '440px',
  245. 'right': '350px',
  246. 'max-width': '350px'
  247. });
  248. document.getElementById('chatBox').innerHTML = 'Hi LOL-_-';
  249. document.getElementById('gameName').innerHTML = '';
  250. setTimeout(() => {
  251. document.getElementById('gameName').innerHTML = 'Loading..';
  252. setTimeout(() => {
  253. document.getElementById('gameName').innerHTML = 'E';
  254. setTimeout(() => {
  255. document.getElementById('gameName').innerHTML = 'EZ';
  256. setTimeout(() => {
  257. document.getElementById('gameName').innerHTML = 'EZ ';
  258. setTimeout(() => {
  259. document.getElementById('gameName').innerHTML = 'EZ H';
  260. setTimeout(() => {
  261. document.getElementById('gameName').innerHTML = 'EZ HA';
  262. setTimeout(() => {
  263. document.getElementById('gameName').innerHTML = 'EZ HAC';
  264. setTimeout(() => {
  265. document.getElementById('gameName').innerHTML = 'EZ HACK';
  266. setTimeout(() => {
  267. document.getElementById('gameName').innerHTML = 'EZ HACK ';
  268. setTimeout(() => {
  269. document.getElementById('gameName').innerHTML = 'EZ HACK MOD v1.5 Beta';
  270. }, 120);
  271. }, 120);
  272. }, 120);
  273. }, 120);
  274. }, 120);
  275. }, 120);
  276. }, 120);
  277. }, 120);
  278. }, 120);
  279. }, 120);
  280. document.getElementById('loadingText').innerHTML = 'Loading...';
  281. setTimeout(() => {
  282. document.getElementById('loadingText').innerHTML = 'loading_Game';
  283. }, 710);
  284. (function () {
  285. 'use strict';
  286. let allianceMenu = document.getElementById('allianceMenu');
  287. let storeMenu = document.getElementById('storeMenu');
  288. document.addEventListener('keydown', function (event) {
  289. if (shouldHandleMenus(event)) {
  290. if (event.key === 'y') {
  291. toggleMenu(allianceMenu, storeMenu);
  292. } else if (event.key === 'u') {
  293. toggleMenu(storeMenu, allianceMenu);
  294. }
  295. if (event.key === 'Y') {
  296. toggleMenu(allianceMenu, storeMenu);
  297. } else if (event.key === 'U') {
  298. toggleMenu(storeMenu, allianceMenu);
  299. }
  300. }
  301. });
  302. function shouldHandleMenus(event) {
  303. const chatboxActive = document.activeElement.id.toLowerCase() === 'chatbox';
  304. const allianceInputActive = document.activeElement.id.toLowerCase() === 'allianceinput';
  305. return !chatboxActive && !allianceInputActive;
  306. }
  307. function toggleMenu(menu, otherMenu) {
  308. if (menu.style.display === 'none' || menu.style.display === '') {
  309. menu.style.display = 'block';
  310. if (otherMenu.style.display !== 'none') {
  311. otherMenu.style.display = 'none';
  312. }
  313. } else {
  314. menu.style.display = 'none';
  315. }
  316. }
  317. })();
  318. document.getElementById('loadingText').innerHTML = '....LOL HACK -_-....'
  319. document.getElementById('gameName').style.textShadow = 'none';
  320. document.getElementById('gameName').style.fontSize = "155px";
  321. document.getElementById('linksContainer2').style.background = "black";
  322. document.getElementById('mapDisplay').height = '450';
  323. document.getElementById('mapDisplay').width = '450';
  324. document.getElementById('diedText').innerHTML = "its..ok";
  325. document.getElementById('diedText').style.color = "black";
  326. $("#moomooio_728x90_home").parent().css({display: "none"});
  327. document.getElementById('linksContainer2').innerHTML = 'EZ HACK MOD' ;
  328. document.querySelector("#gameName").innerHTML = "EZ HACK";
  329. document.getElementById("storeHolder").style = "height: 345px; width: 410px;";
  330. document.getElementById('enterGame').innerText = "EZ HACK MOD";
  331. document.getElementById("enterGame").style.color = "#000000";
  332. document.getElementById("enterGame").style.backgroundColor = "black";
  333. document.title = ' EZ HACK MOD';
  334. $("#mapDisplay").css({background: `url('https://i.imgur.com/aGpK7hj.png')`});
  335. $("#wideAdCard").remove();
  336. $("#storeDisplay1").remove();
  337. $("#adCard").remove();
  338. $("#promoImgHolder").remove();
  339. let style = document.createElement('style')
  340. style.appendChild(document.createTextNode(`
  341. `))
  342. document.head.appendChild(style)
  343. let replaceInterval = setInterval(() => {
  344. if (CanvasRenderingContext2D.prototype.roundRect) {
  345. CanvasRenderingContext2D.prototype.roundRect = ((oldFunc) => function() { if (this.fillStyle == "#8ecc51") this.fillStyle = `hsl(180, 100%, 50%)`; return oldFunc.call(this, ...arguments); })(CanvasRenderingContext2D.prototype.roundRect);
  346. clearInterval(replaceInterval);
  347. }}, 10);
  348. setInterval(() => {
  349. if (autoaim == true) {
  350. doNewSend(["D", [nearestEnemyAngle]]);
  351. }
  352. }, 10);
  353. var spikeType;
  354. var isEnemyNear;
  355. var nearestEnemyAngle;
  356. var autoaim = false;
  357. var primary;
  358. var secondary;
  359. var foodType;
  360. let hitBack = false;
  361. let stackInsta = false;
  362. let anti = true;
  363. let hitTToggle = 1;
  364. let hitToggle = 0;
  365. let hatToggle = 1;
  366. let ais = [];
  367. let ws;
  368. let x = 0;
  369. let y = 0;
  370. let msgpack5 = window.msgpack;
  371. let scale = 45;
  372. let placeOffset = 5;
  373. let crashing;
  374. let cmds = {
  375. autoheal: false,
  376. automill: false
  377. }
  378. let inv = {
  379. primary: null,
  380. secondary: null,
  381. food: null,
  382. wall: null,
  383. spike: null,
  384. trap: null,
  385. mill: null,
  386. mine: null,
  387. boostPad: null,
  388. spikeType: null,
  389. turret: null,
  390. spawnpad: null
  391. };
  392. let myPlayer = {
  393. sid: null,
  394. hp: null,
  395. x: null,
  396. y: null,
  397. dir: null,
  398. buildIndex: null,
  399. weaponIndex: null,
  400. weaponVariant: null,
  401. team: null,
  402. isLeader: null,
  403. skinIndex: null,
  404. tailIndex: null,
  405. iconIndex: null
  406. };
  407. let enemy;
  408. let nearestEnemy;
  409. let enemyInf = { hat: null, x: null, y: null, weaponIndex: null}
  410. document.msgpack = window.msgpack;
  411. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  412. WebSocket.prototype.send = function (e) {
  413. ws || (document.ws = this, ws = this, document.ws.addEventListener("message", hookWS));
  414. this.oldSend(e);
  415. };
  416. function dist(a, b){
  417. return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
  418. }
  419. function handleMessage(m){
  420. let temp = msgpack5.decode(new Uint8Array(m.data));
  421. let data;
  422. if(temp.length > 1) {
  423. data = [temp[0], ...temp[1]];
  424. if (data[1] instanceof Array){
  425. data = data;
  426. }
  427. } else {
  428. data = temp;
  429. }
  430. let item = data[0];
  431. if(!data) {return};
  432. }
  433. let join = message => Array.isArray(message) ? [...message] : [...message];
  434. let hookWS = ms => {
  435. let tmpData = msgpack5.decode(new Uint8Array(ms.data));
  436. let data;
  437. if(tmpData.length > 1) { data = [tmpData[0], ...tmpData[1]]; if (data[1] instanceof Array){ data = data } } else { data = tmpData }
  438. let item = data[0];
  439. if(!data) {return};
  440. if (item == "C" && myPlayer.sid == null){
  441. myPlayer.sid = data[1];
  442. }
  443. if (item == "O" && data[1] == myPlayer.sid) {
  444. let hp = data[2]
  445. if (hp < 91) {
  446. let c;
  447. if (hp < 100) c = 2;
  448. for (let i=0;i<c;i++) setTimeout(() => { place(foodType); }, i * 0.2);
  449. for (let i=0;i<2;i++) setTimeout(() => { place(foodType); }, i * 0);
  450. }
  451. }
  452. /*if (data[2] < 62 && data[2] > 41 && anti == true && (nearestEnemy[5] == 5 || nearestEnemy[5] == 3)) {
  453. //console.log("anti insta - polearm");
  454. doNewSend(["c", [0, 22, 0]]);
  455. place(inv.food);
  456. for (let i=0;i<2;i++) { place(inv.food); }
  457. setTimeout(() => {
  458. place(inv.food);
  459. doNewSend(["c", [0, 6, 0]]);
  460. }, 240);
  461. }*/
  462. if (item == "a") {
  463. enemy = [];
  464. for(let i = 0; i < data[1].length / 13; i++) {
  465. let inf = data[1].slice(13*i, 13*i+13);
  466. if(inf[0] == myPlayer.sid) {
  467. myPlayer.x = inf[1];
  468. myPlayer.y = inf[2];
  469. myPlayer.dir = inf[3];
  470. myPlayer.buildIndex = inf[4];
  471. myPlayer.weaponIndex = inf[5];
  472. myPlayer.weaponVariant = inf[6];
  473. myPlayer.team = inf[7];
  474. myPlayer.isLeader = inf[8];
  475. myPlayer.skinIndex = inf[9];
  476. myPlayer.tailIndex = inf[10];
  477. myPlayer.iconIndex = inf[11];
  478. } else if(inf[7] != myPlayer.team || inf[7] === null) {
  479. enemy.push(inf);
  480. }
  481. }
  482. }
  483. isEnemyNear = false;
  484. if (enemy) {
  485. nearestEnemy = enemy.sort((a, b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
  486. }
  487. isEnemyNear = false;
  488. if (enemy) {
  489. nearestEnemy = enemy.sort((a, b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
  490. }
  491. if (nearestEnemy) {
  492. nearestEnemyAngle = Math.atan2(nearestEnemy[2] - myPlayer.y, nearestEnemy[1] - myPlayer.x);
  493. }
  494. if (nearestEnemy) {
  495. enemyInf.weaponIndex = nearestEnemy[5]
  496. enemyInf.hat = nearestEnemy[9]
  497. enemyInf.x = nearestEnemy[1]
  498. enemyInf.y = nearestEnemy[2]
  499. }
  500. if (y !== myPlayer.y || x !== myPlayer.x) {
  501. if (cmds.automill) {
  502. let angle = Math.atan2(y - myPlayer.y, x - myPlayer.x);
  503. place(inv.mill, angle + Math.PI / 2.2);
  504. place(inv.mill, angle);
  505. place(inv.mill, angle - Math.PI / 2.2);
  506. }
  507. x = myPlayer.x;
  508. y = myPlayer.y;
  509. }
  510. refresh();
  511. }
  512. var turretType;
  513. var repeater = function(key, action, interval) {
  514. let _isKeyDown = false;
  515. let _intervalId = undefined;
  516. return {
  517. start(keycode) {
  518. if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  519. _isKeyDown = true;
  520. if(_intervalId === undefined) {
  521. _intervalId = setInterval(() => {
  522. action();
  523. if(!_isKeyDown){
  524. clearInterval(_intervalId);
  525. _intervalId = undefined;
  526. } }, interval) } } }, stop(keycode) { if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') { _isKeyDown = false; } } } }
  527. function noAcc() {
  528. setTimeout(() => { doNewSend(["c", [0, 0, 1]])}, 10)
  529. setTimeout(() => { doNewSend(["c", [0, 0, 1]])}, 20)
  530. setTimeout(() => { doNewSend(["c", [0, 0, 1]])}, 60)
  531. setTimeout(() => { doNewSend(["c", [0, 0, 1]])}, 70)
  532. setTimeout(() => { doNewSend(["c", [0, 0, 1]])}, 90)
  533. }
  534. function biomeHat() {
  535. if (myPlayer.y < 2400) {
  536. storeEquip(15); doNewSend(["c", [0, 11, 1]]); doNewSend(["c", [0, 15, 0]]); hat(15)
  537. } else {
  538. if (myPlayer.y > 6850 && myPlayer.y < 7550) {
  539. storeEquip(31); doNewSend(["c", [0, 31, 0]]); hat(31); doNewSend(["c", [0, 11, 1]]);
  540. } else {
  541. storeEquip(12); doNewSend(["c", [0, 12, 0]]); hat(12); doNewSend(["c", [0, 11, 1]]);
  542. }
  543. }
  544. }
  545. if (!nearestEnemy) {
  546. nearestEnemyAngle = myPlayer.dir;
  547. }
  548. function isElementVisible(e) {
  549. return (e.offsetParent !== null);
  550. }
  551. if (crashing && !closed) {
  552. for (let e = 0; e < 1000; e++) {
  553. let result = new Uint8Array(Math.round(Math.random() * 18));for (let i = 0; i < result.length; i++) {if (i == 0) {result[i] = Math.round(Math.random() * 256);} else {if (i == 1) {result[i] = Math.round(Math.random() * 256);} else {if (i == 2) {result[i] = Math.round(Math.random() * 128);} else {if (i == 3) {result[i] = Math.round(Math.random() * 85);} else {if (i == 4) {result[i] = Math.round(Math.random() * 64);} else {if (i == 5) {result[i] = Math.round(Math.random() * 51);} else {if (i == 6) {result[i] = Math.round(Math.random() * 42);} else {if (i == 7) {result[i] = Math.round(Math.random() * 36);} else {if (i == 8) {result[i] = Math.round(Math.random() * 32);} else {if (i == 9) {result[i] = Math.round(Math.random() * 28);} else {if (i == 10) {result[i] = Math.round(Math.random() * 25);} else {if (i == 11) {result[i] = Math.round(Math.random() * 23);} else {if (i == 12) {result[i] = Math.round(Math.random() * 21);} else {if (i == 13) {result[i] = Math.round(Math.random() * 19);} else {if (i == 14) {result[i] = Math.round(Math.random() * 18);} else {if (i == 15) {result[i] = Math.round(Math.random() * 17);} else {if (i == 16) {result[i] = Math.round(Math.random() * 16);} else {if (i == 17) {result[i] = Math.round(Math.random() * 15);}}}}}}}}}}}}}}}}}}}ws.oldSend(result);
  554. }
  555. }
  556. function doNewSend(sender){
  557. ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
  558. }
  559. const emit = (e, a, b, c, m, r) => ws.send(Uint8Array.from([...msgpack5.encode([e, [a, b, c, m, r]])]));
  560. const place = (e, l) => {
  561. emit("G", e, false);
  562. emit("d", 1, l);
  563. emit("d", 0, l);
  564. emit("G", myPlayer.weaponIndex, true);
  565. };
  566. function chat(msg) { emit("6", msg); }
  567. function acc(id) {
  568. doNewSend(["c", [0, 0, 1]]);
  569. doNewSend(["c", [0, id, 1]]);
  570. }
  571. function hat(id) {
  572. emit("c", myPlayer.skinIndex, id, 0);
  573. doNewSend(["c", [0, id, 0]]);
  574. }
  575. function weapon(e) {
  576. if (e === 'primary') { emit("G", inv.primary, true); }
  577. if (e === 'secondary') { emit("G", inv.secondary, true) }
  578. }
  579. function toRad(angle) {
  580. return angle * 0.01745329251;
  581. }
  582. function hit(e) {
  583. if (e == true || e == false) emit("K", true)
  584. }
  585. const refresh = () => {
  586. for (let c = 0; c < 9; c++) {
  587. var _document$getElementB;
  588. if (((_document$getElementB = document.getElementById(`actionBarItem${c}`)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.offsetParent) !== null) {
  589. inv.primary = c;
  590. }
  591. }
  592. for (let s = 9; s < 16; s++) {
  593. var _document$getElementB2;
  594. if (((_document$getElementB2 = document.getElementById(`actionBarItem${s}`)) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.offsetParent) !== null) {
  595. inv.secondary = s;
  596. }
  597. }
  598. for (let P = 16; P < 19; P++) {
  599. var _document$getElementB3;
  600. if (((_document$getElementB3 = document.getElementById(`actionBarItem${P}`)) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.offsetParent) !== null) {
  601. inv.food = P - 16;
  602. }
  603. }
  604. for (let f = 19; f < 22; f++) {
  605. var _document$getElementB4;
  606. if (((_document$getElementB4 = document.getElementById(`actionBarItem${f}`)) === null || _document$getElementB4 === void 0 ? void 0 : _document$getElementB4.offsetParent) !== null) {
  607. inv.wall = f - 16;
  608. }
  609. }
  610. for (let _ = 22; _ < 26; _++) {
  611. var _document$getElementB5;
  612. if (((_document$getElementB5 = document.getElementById(`actionBarItem${_}`)) === null || _document$getElementB5 === void 0 ? void 0 : _document$getElementB5.offsetParent) !== null) {
  613. inv.spike = _ - 16;
  614. }
  615. }
  616. for (let u = 26; u < 29; u++) {
  617. var _document$getElementB6;
  618. if (((_document$getElementB6 = document.getElementById(`actionBarItem${u}`)) === null || _document$getElementB6 === void 0 ? void 0 : _document$getElementB6.offsetParent) !== null) {
  619. inv.mill = u - 16;
  620. }
  621. }
  622. for (let I = 29; I < 31; I++) {
  623. var _document$getElementB7;
  624. if (((_document$getElementB7 = document.getElementById(`actionBarItem${I}`)) === null || _document$getElementB7 === void 0 ? void 0 : _document$getElementB7.offsetParent) !== null) {
  625. inv.mine = I - 16;
  626. }
  627. }
  628. for (let p = 31; p < 33; p++) {
  629. var _document$getElementB8;
  630. if (((_document$getElementB8 = document.getElementById(`actionBarItem${p}`)) === null || _document$getElementB8 === void 0 ? void 0 : _document$getElementB8.offsetParent) !== null) {
  631. inv.boostPad = p - 16;
  632. }
  633. }
  634. for (let x = 31; x < 33; x++) {
  635. var _document$getElementB9;
  636. if (((_document$getElementB9 = document.getElementById(`actionBarItem${x}`)) === null || _document$getElementB9 === void 0 ? void 0 : _document$getElementB9.offsetParent) !== null) {
  637. inv.trap = x - 16;
  638. }
  639. }
  640. for (let i = 22; i < 26; i++) {
  641. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  642. spikeType = i - 16;
  643. }
  644. }
  645. for (let i = 16; i < 19; i++) {
  646. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  647. foodType = i - 16;
  648. }
  649. }
  650. for (let i = 9; i < 16; i++) {
  651. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  652. secondary = i;
  653. }
  654. }
  655. for (let i = 0; i < 9; i++) {
  656. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))) {
  657. primary = i;
  658. }
  659. }
  660. for (let i=33;i<36;i++){
  661. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  662. turretType = i - 16;
  663. }
  664. }
  665. for (let i=37;i<39;i++){
  666. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  667. turretType = i - 16;
  668. }
  669. }
  670. };
  671. const boostPlacer = repeater(70,() => {place(inv.trap);},60);
  672. const spikePlacer = repeater(86,() => {place(spikeType);},50);
  673. const placers = [boostPlacer, spikePlacer];
  674. let prevCount = 0;
  675. const handleMutations = (mutationsList) => {
  676. for (const mutation of mutationsList) {
  677. if (mutation.target.id === "killCounter") {
  678. const count = parseInt(mutation.target.innerText, 10) || 0;
  679. if (count > prevCount) {
  680. setTimeout(()=>{ chat('Master Kill') },0);
  681. setTimeout(()=>{
  682. chat('NOOB!!!')
  683. },950);
  684. setTimeout(()=>{
  685. chat('Mod By EZ HACK')
  686. },1930);
  687. setTimeout(()=>{
  688. chat('Mod By EZ HACK')
  689. },2200);
  690. prevCount = count;
  691. }
  692. if (count > prevCount) {
  693. setTimeout(()=>{ chat('Master Kill') },10);
  694. setTimeout(()=>{
  695. chat('NOOB!!!')
  696. },950);
  697. setTimeout(()=>{
  698. chat('Mod By EZ HACK')
  699. },1920);
  700. setTimeout(()=>{
  701. chat('Mod By EZ HACK')
  702. },2200);
  703. prevCount = count;
  704. }}}
  705. };
  706. const observer = new MutationObserver(handleMutations);
  707. observer.observe(document, {
  708. subtree: true,
  709. childList: true,
  710. });
  711. document.addEventListener('keydown', (e) => {
  712. if (["allianceinput", "chatbox", "nameinput", "storeHolder"].includes(document.activeElement.id.toLowerCase()))
  713. return null;
  714. placers.forEach((t) => {
  715. t.start(e.keyCode);
  716. });
  717. if (e.keyCode == 78) {
  718. if (cmds.automill == true) { cmds.automill = false } else { cmds.automill = true }
  719. }
  720. if (e.keyCode === 81) {
  721. for (let i=0;i<2;i++) { place(inv.food); } // Q
  722. };
  723. if (e.keyCode == 16) { storeEquip(6); doNewSend(["c", [0, 31, 0]]); hat(6); setTimeout(() => {doNewSend(["c", [0, 21, 1]]); setTimeout(() => { doNewSend(["c", [0, 21, 1]]);}, 70)}, 70) } // SHIFT
  724. if (e.keyCode == 16) { storeEquip(6); doNewSend(["c", [0, 31, 0]]); hat(6); setTimeout(() => {doNewSend(["c", [0, 21, 1]]); setTimeout(() => { doNewSend(["c", [0, 21, 1]]);}, 70)}, 70) } // SHIFT
  725. if (e.keyCode == 17) { storeEquip(22); doNewSend(["c", [0, 21, 1]]); doNewSend(["c", [0, 22, 0]]); hat(22); setTimeout(() => { doNewSend(["c", [0, 21, 1]]);}, 70) } // CTRL
  726. if (e.keyCode == 17) { storeEquip(22); doNewSend(["c", [0, 21, 1]]); doNewSend(["c", [0, 22, 0]]); hat(22); setTimeout(() => { doNewSend(["c", [0, 21, 1]]);}, 70) } // CTRL
  727. if (e.keyCode == 32) { storeEquip(7); doNewSend(["c", [0, 0, 1]]); setTimeout(() => { storeEquip(53)}, 70); setTimeout(() => { doNewSend(["c", [0, 0, 1]]);}, 70) } // SPACE
  728. if (e.keyCode == 32) { storeEquip(7); doNewSend(["c", [0, 0, 1]]); setTimeout(() => { storeEquip(53)}, 70); setTimeout(() => { doNewSend(["c", [0, 0, 1]]);}, 70) } // SPACE
  729. if (e.keyCode == 67) { chat(''); doNewSend(["c", [0, 0, 0]]); hat(0); setTimeout(() => { doNewSend(["c", [0, 0, 1]])}, 70) } // C
  730. if (e.keyCode == 67) { chat('EZ KILL IM SUPER PRO'); doNewSend(["c", [0, 0, 0]]); hat(0); setTimeout(() => { doNewSend(["c", [0, 0, 1]])}, 70) } // C
  731. if (e.keyCode == 90) { storeEquip(13); doNewSend(["c", [0, 17, 1]]); doNewSend(["c", [0, 13, 0]]); hat(13); setTimeout(() => { doNewSend(["c", [0, 13, 1]]);}, 120) } // Z
  732. if (e.keyCode == 90) { storeEquip(13); doNewSend(["c", [0, 17, 1]]); doNewSend(["c", [0, 13, 0]]); hat(13); setTimeout(() => { doNewSend(["c", [0, 13, 1]]);}, 120) } // Z
  733. if (e.keyCode == 66) { chat('turret pls') } // B
  734. if (e.keyCode == 77) { chat('fak israel') } // M
  735. if (e.keyCode == 32) { chat('Spike insta kill...') } // SPACE
  736. if (e.keyCode == 71) { // G
  737. setTimeout(() => { doNewSend(["c", [0, 11, 1]]);}, 70)
  738. setTimeout(() => { doNewSend(["c", [0, 11, 1]]);}, 50)
  739. setTimeout(() => { doNewSend(["c", [0, 11, 1]]);}, 40)
  740. biomeHat(); biomeHat();
  741. biomeHat(); biomeHat();
  742. }
  743. if (e.keyCode == 69) { // E
  744. hitToggle = (hitToggle + 1) % 2;
  745. if(hitTToggle == 1){
  746. if(hitToggle == 1) {
  747. if(!isEnemyNear){
  748. doNewSend(["c", [0, 40, 0]]);
  749. }
  750. }else{
  751. doNewSend(["c", [0, 6, 0]]);
  752. }
  753. }
  754. }
  755. if (e.keyCode == 48) { // 0
  756. hitToggle = (hitToggle + 1) % 2;
  757. if(hitTToggle == 1){
  758. if(hitToggle == 1) {
  759. if(!isEnemyNear){
  760. doNewSend(["c", [0, 40, 0]]);
  761. }
  762. }else{
  763. doNewSend(["c", [0, 6, 0]]);
  764. }
  765. }
  766. }
  767. if (e.keyCode == 72) { // H
  768. place(turretType, myPlayer.dir + toRad(45));
  769. place(turretType, myPlayer.dir - toRad(45));
  770. }
  771. if (e.keyCode == 32) { // SPACE
  772. place(inv.spike);
  773. doNewSend(["d", [1]]);
  774. doNewSend(["c", [0, 7, 0]]);
  775. doNewSend(["G", [primary, true]]);
  776. doNewSend(["d", [1]]);
  777. weapon('primary')
  778. hit(true)
  779. setTimeout(() => {
  780. doNewSend(["c", [0, 6, 0]]);
  781. doNewSend(["d", [0]]);
  782. }, 400);
  783. setTimeout(() => {
  784. setTimeout(()=>{storeEquip(53); storeEquip(53) }, 70)
  785. setTimeout(() => { hit(false); storeEquip(6); hat(6) }, 350)
  786. }, 180) } 20
  787. if (e.keyCode == 79) { // O
  788. place(inv.spike, myPlayer.dir + toRad(45));
  789. place(inv.spike, myPlayer.dir - toRad(45));
  790. place(inv.spike, myPlayer.dir + toRad(135));
  791. place(inv.spike, myPlayer.dir - toRad(135));
  792. }
  793. if (e.keyCode == 67) { // C
  794. noAcc();
  795. setTimeout(() => { doNewSend(["c", [0, 0, 1]]);}, 70)
  796. setTimeout(() => { doNewSend(["c", [0, 0, 1]]);}, 50)
  797. setTimeout(() => { doNewSend(["c", [0, 0, 1]]);}, 40)
  798. }
  799. if (e.keyCode == 84) { // T
  800. if(stackInsta == false){
  801. // autoaim = true;
  802. doNewSend(["d", [1]]);
  803. doNewSend(["G", [secondary, true]]);
  804. doNewSend(["c", [0, 53, 0]]);
  805. setTimeout(() => {
  806. doNewSend(["G", [primary, true]]);
  807. doNewSend(["c", [0, 7, 0]]);
  808. doNewSend(["d", [1]]);
  809. doNewSend(["d", [0]]);
  810. }, 80);
  811. setTimeout(() => {
  812. doNewSend(["G", [primary, true]]);
  813. doNewSend(["c", [0, 6, 0]]);
  814. doNewSend(["d", [0]]);
  815. // autoaim = false;
  816. }, 500);
  817. } else {
  818. // autoaim = true;
  819. doNewSend(["d", [1]]);
  820. doNewSend(["G", [secondary, true]]);
  821. doNewSend(["c", [0, 53, 0]]);
  822. setTimeout(() => {
  823. var sck = "";
  824. doNewSend(["G", [primary, true]]);
  825. doNewSend(["c", [0, 7, 0]]);
  826. doNewSend(["d", [1]]);
  827. doNewSend(["d", [0]]);
  828. for(let i = 0; i < 850; i++){
  829. let caas = new Uint8Array(550);
  830. for(let i = 0; i <caas.length;i++){
  831. caas[i] = Math.floor(Math.random()*270);
  832. sck += caas[i]
  833. }}
  834. ws.send(caas);
  835. }, 80);
  836. setTimeout(() => {
  837. doNewSend(["G", [primary, true]]);
  838. doNewSend(["c", [0, 6, 0]]);
  839. doNewSend(["d", [0]]);
  840. // autoaim = false;
  841. }, 500);
  842. }
  843. }
  844. if (e.keyCode == 82) { // R
  845. // autoaim = true;
  846. doNewSend(["c", [0, 7, 0]]);
  847. doNewSend(["G", [primary, true]]);
  848. doNewSend(["G", [weapon('primary'), true]]);
  849. weapon('primary')
  850. doNewSend(["d", [1]]);
  851. }
  852. if (e.keyCode == 82) { // R
  853. if (stackInsta == false) {
  854. // autoaim = true;
  855. doNewSend(["c", [0, 7, 0]]);
  856. doNewSend(["G", [primary, true]]);
  857. doNewSend(["c", [0, 0, 1]])
  858. doNewSend(["d", [1]]);
  859. doNewSend(["c", [1]]);
  860. setTimeout(() => {
  861. weapon('secondary')
  862. doNewSend(["G", [secondary, true]]);
  863. }, 98);
  864. setTimeout(() => {
  865. weapon('secondary')
  866. doNewSend(["G", [secondary, true]]);
  867. }, 100);
  868. setTimeout(() => {
  869. weapon('secondary')
  870. doNewSend(["G", [secondary, true]]);
  871. }, 103.7);
  872. setTimeout(() => {
  873. doNewSend(["G", [secondary, true]]);
  874. doNewSend(["c", [0, 53, 0]]);
  875. doNewSend(["c", [0, 0, 1]]);
  876. }, 105);
  877. setTimeout(() => {
  878. doNewSend(["G", [secondary, true]]);
  879. }, 110);
  880. setTimeout(() => {
  881. doNewSend(["G", [secondary, true]]);
  882. }, 115);
  883. setTimeout(() => {
  884. doNewSend(["G", [primary, true]]);
  885. doNewSend(["d", [0, null]]);
  886. doNewSend(["c", [0, 6, 0]]);
  887. doNewSend(["c", [0, 0, 0]]);
  888. doNewSend(["c", [0, 0, 1]]);
  889. hat(6)
  890. // autoaim = false;
  891. }, 215);
  892. } else {
  893. // autoaim = true;
  894. doNewSend(["c", [0, 7, 0]]);
  895. doNewSend(["G", [primary, true]]);
  896. doNewSend(["c", [0, 0, 1]])
  897. doNewSend(["d", [1]]);
  898. doNewSend(["c", [1]]);
  899. setTimeout( () => {
  900. var sck = "";
  901. doNewSend(["G", [secondary, true]]);
  902. weapon('secondary')
  903. doNewSend(["c", [0, 53, 0]]);
  904. doNewSend(["c", [0, 0, 1]]);
  905. for(let i = 0; i < 850; i++){
  906. let caas = new Uint8Array(550);
  907. for(let i = 0; i <caas.length;i++){
  908. caas[i] = Math.floor(Math.random()*270);
  909. sck += caas[i]
  910. }}
  911. ws.send(caas);
  912. }, 98);
  913. setTimeout(() => {
  914. doNewSend(["G", [secondary, true]]);
  915. }, 200);
  916. setTimeout(() => {
  917. doNewSend(["G", [primary, true]]);
  918. doNewSend(["d", [0, null]]);
  919. doNewSend(["c", [0, 6, 0]]);
  920. doNewSend(["c", [0, 0, 0]]);
  921. doNewSend(["c", [0, 0, 1]]);
  922. hat(6)
  923. acc(21)
  924. // autoaim = false;
  925. }, 215);//215
  926. }}
  927. })
  928. document.addEventListener("keydown", function(event) {
  929. if (event.keyCode === 45) { // INSERT
  930. const chatHolder = document.getElementById("gameUI");
  931. if (chatHolder) {
  932. const currentDisplay = chatHolder.style.display;
  933. chatHolder.style.display = currentDisplay === "none" ? "block" : "none";
  934. }}
  935. });
  936. document.addEventListener('keyup', (e) => {
  937. if (["allianceinput", "chatbox", "nameinput", "storeHolder"].includes(document.activeElement.id.toLowerCase()))
  938. return null;
  939. placers.forEach((t) => {
  940. t.stop(e.keyCode);
  941. })
  942. })
  943. document.addEventListener("mousedown", event => {
  944. if (event.button == 1) {
  945. place(inv.trap, myPlayer.dir + toRad(45));
  946. place(inv.trap, myPlayer.dir - toRad(45));
  947. place(inv.trap, myPlayer.dir + toRad(135));
  948. place(inv.trap, myPlayer.dir - toRad(135));
  949. }
  950. })
  951. document.addEventListener("mousedown", (event) => {
  952. if (event.button == 4) {
  953. doNewSend(["d", [1]]);
  954. doNewSend(["c", [0, 40, 0]]);
  955. doNewSend(["G", [primary, true]]);
  956. setTimeout(()=>{
  957. doNewSend(["d", [0]]);
  958. doNewSend(["c", [0, 6, 0]]);
  959. },100);
  960. } else if (event.button == 4) {
  961. doNewSend(["d", [1]]);
  962. doNewSend(["c", [0, 40, 0]]);
  963. doNewSend(["G", [primary, true]]);
  964. setTimeout(()=>{
  965. doNewSend(["d", [0]]);
  966. doNewSend(["c", [0, 6, 0]]);
  967. },110);
  968. }
  969. })
  970. document.addEventListener("mousedown", event => {
  971. if (event.button == 2) {
  972. weapon('primary')
  973. storeEquip(7)
  974. storeEquip(7)
  975. setTimeout(() => { storeEquip(53); hat(53) }, 100)
  976. setTimeout(() => { storeEquip(6); hat(6) }, 310)
  977. }
  978. });
  979. let ping = document.createElement("div");
  980. ping = document.getElementById("pingDisplay");
  981. ping.style.top = "10px";
  982. ping.style.fontSize = "12px";
  983. ping.style.display = "block";
  984. document.body.append(ping);
  985. window.onbeforeunload = null;
  986.  
  987. class forReal {
  988. constructor() {
  989. this.time = 100;
  990. this.hatIndex = [50, 28, 29, 30, 36, 37, 38, 44, 35, 43, 49, 57];
  991. this.currentIndex = 0;
  992. this.isActivated = false;
  993. }
  994. newTick(callback, delay) {
  995. setTimeout(callback, delay);
  996. }
  997. toggleActivation() {
  998. this.isActivated = !this.isActivated;
  999. if (this.isActivated) {
  1000. chat('on_L')
  1001. this.equip();
  1002. }else{
  1003. setTimeout(()=>{
  1004. chat('off_L')
  1005. window.storeEquip(0);
  1006. }, 500);
  1007. }}
  1008. equip() {
  1009. if (this.currentIndex < this.hatIndex.length) {
  1010. let equipNumber = this.hatIndex[this.currentIndex];
  1011. window.storeEquip(equipNumber);
  1012. this.currentIndex++;
  1013. } else {
  1014. this.currentIndex = 0;
  1015. }
  1016. if (this.isActivated) {
  1017. setTimeout(() => {
  1018. this.newTick(() => this.equip(), this.time);
  1019. }, 80);
  1020. }}
  1021. start() {
  1022. document.body.onkeyup = (e) => {
  1023. if (e.keyCode === 76) {
  1024. this.toggleActivation();
  1025. }};}}
  1026. const equipManager = new forReal();
  1027. equipManager.start();
  1028.  
  1029. (function() {
  1030. let oldLineTo = CanvasRenderingContext2D.prototype.lineTo;
  1031. let oldFillRect = CanvasRenderingContext2D.prototype.fillRect;
  1032. CanvasRenderingContext2D.prototype.lineTo = function() {
  1033. if (this.globalAlpha != .06) oldLineTo.apply(this, arguments);
  1034. };
  1035. document.getElementById("enterGame").addEventListener('click', rwrw)
  1036. var RLC = 0
  1037. var MLC = 0
  1038. var KFC = 0
  1039. function rwrw() {
  1040. console.log("Game Start")
  1041. S = 1;
  1042. M = 1;
  1043. H = 1
  1044. }
  1045. var H = 1,
  1046. M = 1,
  1047. S = 1
  1048. setInterval(() => {
  1049. RLC++
  1050. S++
  1051. }, 1000);
  1052. setInterval(() => {
  1053. if (RLC == 60) {
  1054. MLC++
  1055. RLC = 0
  1056. }
  1057. if (MLC == 60) {
  1058. KFC++
  1059. MLC = 0
  1060. }
  1061. if (S == 60) {
  1062. M++
  1063. S = 0
  1064. }
  1065. if (M == 60) {
  1066. H++
  1067. M = 0
  1068. }
  1069. }, 0);
  1070. const { msgpack } = window
  1071. function AntiKick() {
  1072. this.resetDelay = 500
  1073. this.packetsLimit = 40
  1074. this.ignoreTypes = [ "pp", "rmd" ]
  1075. this.ignoreQueuePackets = [ "5", "c", "33", "2", "7", "13c" ]
  1076. this.packetsStorage = new Map()
  1077. this.tmpPackets = []
  1078. this.packetsQueue = []
  1079. this.lastSent = Date.now()
  1080. this.onSend = function(data) {
  1081. const binary = new Uint8Array(data)
  1082. const parsed = msgpack.decode(binary)
  1083. if (Date.now() - this.lastSent > this.resetDelay) {
  1084. this.tmpPackets = []
  1085. this.lastSent = Date.now()
  1086. }
  1087. if (!this.ignoreTypes.includes(parsed[0])) {
  1088. if (this.packetsStorage.has(parsed[0])) {
  1089. const oldPacket = this.packetsStorage.get(parsed[0])
  1090. switch (parsed[0]) {
  1091. case "2":
  1092. case "33":
  1093. if (oldPacket[0] == parsed[1][0]) return true
  1094. break
  1095. }
  1096. }
  1097.  
  1098. if (this.tmpPackets.length > this.packetsLimit) {
  1099. if (!this.ignoreQueuePackets.includes(parsed[0])) {
  1100. this.packetsQueue.push(data)
  1101. }
  1102. return true
  1103. }
  1104. this.tmpPackets.push({
  1105. type: parsed[0],
  1106. data: parsed[1]
  1107. })
  1108. this.packetsStorage.set(parsed[0], parsed[1])
  1109. }
  1110. return false
  1111. }
  1112. }
  1113. const antiKick = new AntiKick()
  1114. let firstSend = false
  1115. window.WebSocket.prototype.send = new Proxy(window.WebSocket.prototype.send, {
  1116. apply: function(target, _this) {
  1117. if (!firstSend) {
  1118. _this.addEventListener("message", (event) => {
  1119. if (!antiKick.packetsQueue.length) return
  1120. const binary = new Uint8Array(event.data)
  1121. const parsed = msgpack.decode(binary)
  1122. if (parsed[0] === "33") {
  1123. _this.send(antiKick.packetsQueue[0])
  1124. antiKick.packetsQueue.shift()
  1125. }
  1126. })
  1127. firstSend = true
  1128. }
  1129. if (antiKick.onSend(arguments[2][0])) return
  1130. return Reflect.apply(...arguments)
  1131. }
  1132. })
  1133. })();
  1134. ;(async () => {
  1135. const MARKER_COLOUR = {
  1136. MY_PLAYER: {
  1137. render: true,
  1138. colour: "#a7f060"
  1139. },
  1140. TEAMMATE: {
  1141. render: true,
  1142. colour: "#fceb65"
  1143. },
  1144. ENEMY: {
  1145. render: true,
  1146. colour: "#f76363"
  1147. }
  1148. }
  1149. const MARKER_SIZE = 10
  1150. function getItemColour(sid) {
  1151. if (sid === myPlayerSID) return MARKER_COLOUR.MY_PLAYER
  1152. if (teammates.includes(sid)) return MARKER_COLOUR.TEAMMATE
  1153. return MARKER_COLOUR.ENEMY
  1154. }
  1155. var myPlayerSID = null
  1156. var teammates = []
  1157. let init = false
  1158. await new Promise(async (resolve) => {
  1159. let { send } = WebSocket.prototype
  1160. WebSocket.prototype.send = function (...x) {
  1161. send.apply(this, x)
  1162. this.send = send
  1163. if (!init) {
  1164. init = true
  1165. this.addEventListener("message", (e) => {
  1166. if (!e.origin.includes("moomoo.io") && !unsafeWindow.privateServer) return
  1167. const [packet, data] = msgpack.decode(new Uint8Array(e.data))
  1168. switch (packet) {
  1169. case PACKETCODE.RECEIVE.setupGame:
  1170. myPlayerSID = data[0]
  1171. break
  1172. case PACKETCODE.RECEIVE.setPlayerTeam:
  1173. if (!data[0][1]) {
  1174. teammates = []
  1175. }
  1176. break
  1177. case PACKETCODE.RECEIVE.setAlliancePlayers:
  1178. teammates = []
  1179. for (let i = 0; i < data[0][1].length; i += 2) {
  1180. const [sid, name] = data[0][1].slice(i, i + 2)
  1181. teammates.push(sid)
  1182. }
  1183. break
  1184. }
  1185. })
  1186. }
  1187. resolve(this)
  1188. }
  1189. })
  1190. let item = null
  1191. const symbol = Symbol("isItem")
  1192. Object.defineProperty(Object.prototype, "isItem", {
  1193. get() {
  1194. if (this[symbol] === true) {
  1195. item = this
  1196. }
  1197. return this[symbol]
  1198. },
  1199. set(value) {
  1200. this[symbol] = value
  1201. },
  1202. configurable: true
  1203. })
  1204. function drawMarker(ctx) {
  1205. if (!item || !item.owner || myPlayerSID === null) return
  1206. const type = getItemColour(item.owner.sid)
  1207. if (!type.render) return
  1208. ctx.fillStyle = type.colour
  1209. ctx.beginPath()
  1210. ctx.arc(0, 0, MARKER_SIZE, 0, 2 * Math.PI)
  1211. ctx.fill()
  1212. item = null
  1213. }
  1214. CanvasRenderingContext2D.prototype.restore = new Proxy(CanvasRenderingContext2D.prototype.restore, {
  1215. apply(target, _this, args) {
  1216. drawMarker(_this)
  1217. return target.apply(_this, args)
  1218. }
  1219. })
  1220. })()
  1221. (function() {'use strict';const htmlCanvas = document.getElementById("canvas");const offscreen = htmlCanvas.transferControlToOffscreen();const worker = new Worker("offscreencanvas.js");worker.postMessage({ canvas: offscreen }, [offscreen]);})();
  1222.  
  1223. if (window.location.hostname.includes("moomoo.io") ||
  1224. window.location.hostname.includes("sandbox.moomoo.io") ||
  1225. window.location.hostname.includes("dev.moomoo.io")) {
  1226. (() => {
  1227. "use strict";
  1228. const PACKET_LIMITS = {
  1229. PER_MINUTE: 1000,
  1230. PER_SECOND: 80,
  1231. };
  1232. const IGNORED_PACKET_TYPES = new Set(["pp", "rmd"]);
  1233. const IGNORED_QUEUE_PACKETS = new Set(["5", "c", "33", "2", "7", "13c"]);
  1234. class AntiKick {
  1235. constructor() {
  1236. this.resetRateLimit();
  1237. }
  1238. resetRateLimit() {
  1239. this.packetHistory = new Map();
  1240. this.packetQueue = [];
  1241. this.lastSent = Date.now();
  1242. }
  1243. isRateLimited(data) {
  1244. const binaryData = new Uint8Array(data);
  1245. if (Date.now() - this.lastSent > PACKET_LIMITS.PER_MINUTE) {
  1246. this.resetRateLimit();
  1247. }
  1248. const packetType = binaryData[0];
  1249. if (!IGNORED_PACKET_TYPES.has(packetType)) {
  1250. if (this.packetHistory.has(packetType) &&
  1251. (("2" === packetType || "33" === packetType) && this.packetHistory.get(packetType)[0] === binaryData[1])) {
  1252. return true;
  1253. }
  1254. if (this.packetQueue.length > PACKET_LIMITS.PER_SECOND) {
  1255. return IGNORED_QUEUE_PACKETS.has(packetType) || this.packetQueue.push(data);
  1256. }
  1257. this.packetQueue.push({ type: packetType, data: binaryData.slice(1) });
  1258. this.packetHistory.set(packetType, binaryData.slice(1));
  1259. }
  1260. return false;
  1261. }
  1262. }
  1263. const antiKick = new AntiKick();
  1264. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  1265. apply(target, thisArg, binary) {
  1266. if (!thisArg.messageListenerSet) {
  1267. thisArg.addEventListener("message", (event) => {
  1268. if (antiKick.packetQueue.length) {
  1269. const binaryData = new Uint8Array(event.data);
  1270. if (binaryData[0] === 51) {
  1271. thisArg.send(antiKick.packetQueue[0]);
  1272. antiKick.packetQueue.shift();
  1273. }
  1274. }
  1275. });
  1276. thisArg.messageListenerSet = true;
  1277. }
  1278. if (!antiKick.isRateLimited(binary)) {
  1279. return Reflect.apply(target, thisArg, binary);
  1280. }
  1281. },
  1282. });
  1283. })();
  1284. }
  1285. var antii = document.querySelector("#anti")
  1286. antii.addEventListener('change', function() {
  1287. if (this.checked) {
  1288. anti = true;
  1289. } else {
  1290. anti = false;
  1291. }
  1292. });
  1293. var hitBackk = document.querySelector("#hitBack")
  1294. hitBackk.addEventListener('change', function() {
  1295. if (this.checked) {
  1296. hitBack = true;
  1297. } else {
  1298. hitBack = false;
  1299. }
  1300. });
  1301. var stackInstaa = document.querySelector("#stackInsta")
  1302. stackInstaa.addEventListener('change', function() {
  1303. if (this.checked) {
  1304. stackInsta = true;
  1305. } else {
  1306. stackInsta = false;
  1307. }
  1308. });
  1309. // www.mohmoh.eu
  1310. localStorage.moofoll = !0;
  1311. localStorage.setItem("res", 1000000);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址