myMod 2 (old v4) sorry for this report sender

v - spike, f - trap, - h - 2 turrets, space - spikeTick, r - insta, c - 4 spike "insta", rightMouse - tankspam, o - qadro boost/trap, ESC - menu beta, T - rev insta, G - beta one tick boost, (deleted part, report.)>:()

目前为 2024-01-06 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name myMod 2 (old v4) sorry for this report sender
  3. // @namespace Nigger 12
  4. // @version 4_Beta
  5. // @description v - spike, f - trap, - h - 2 turrets, space - spikeTick, r - insta, c - 4 spike "insta", rightMouse - tankspam, o - qadro boost/trap, ESC - menu beta, T - rev insta, G - beta one tick boost, (deleted part, report.)>:()
  6. // @author Undyne the Undying (author gondon)
  7. // @license MIT
  8. // @match *://moomoo.io/*
  9. // @match *://sandbox.moomoo.io/*
  10. // @match *://dev.moomoo.io/*
  11. // @require https://greasyfork.org/scripts/423602-msgpack/code/msgpack.js?version=912797
  12. // @require http://code.jquery.com/jquery-3.3.1.min.js
  13. // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
  14. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
  15. // @grant none
  16. // @icon https://cdn.discordapp.com/avatars/1131925981460975676/36b51f984147c8b907af0a3dcb834853.png?size=4096
  17. // @run-at document-end
  18. // ==/UserScript==
  19. var Speed = 0;
  20. function speedweapon() {
  21. if(myPlayer.weapon == 0){Speed = 300}
  22. if(myPlayer.weapon == 1){Speed = 400}
  23. if(myPlayer.weapon == 2){Speed = 400}
  24. if(myPlayer.weapon == 3){Speed = 300}
  25. if(myPlayer.weapon == 4){Speed = 300}
  26. if(myPlayer.weapon == 5){Speed = 700}
  27. if(myPlayer.weapon == 6){Speed = 300}
  28. if(myPlayer.weapon == 7){Speed = 100}
  29. if(myPlayer.weapon == 10){Speed = 400}
  30. }
  31. function speedWeaponall() {
  32. if (myPlayer.weapon == 0) {SpeedAll = 300}
  33. if (myPlayer.weapon == 1) {SpeedAll = 400}
  34. if (myPlayer.weapon == 2) {SpeedAll = 400}
  35. if (myPlayer.weapon == 3) {SpeedAll = 300}
  36. if (myPlayer.weapon == 4) {SpeedAll = 300}
  37. if (myPlayer.weapon == 5) {SpeedAll = 700}
  38. if (myPlayer.weapon == 6) {SpeedAll = 300}
  39. if (myPlayer.weapon == 7) {SpeedAll = 100}
  40. if (myPlayer.weapon == 8) {SpeedAll = 400}
  41. if (myPlayer.weapon == 9) {SpeedAll = 600}
  42. if (myPlayer.weapon == 10) {SpeedAll = 400}
  43. if (myPlayer.weapon == 12) {SpeedAll = 700}
  44. if (myPlayer.weapon == 13) {SpeedAll = 230}
  45. if (myPlayer.weapon == 14) {SpeedAll = 700}
  46. if (myPlayer.weapon == 15) {SpeedAll = 1500}
  47. }
  48. function speedWeapon3() {
  49. doNewSend(["G", [primary, true]])
  50. doNewSend(["G", [primary, true]]);
  51. if (myPlayer.weapon == 0) {Speed3 = 300}
  52. if (myPlayer.weapon == 1) {Speed3 = 400}
  53. if (myPlayer.weapon == 2) {Speed3 = 400}
  54. if (myPlayer.weapon == 3) {Speed3 = 300}
  55. if (myPlayer.weapon == 4) {Speed3 = 300}
  56. if (myPlayer.weapon == 5) {Speed3 = 700}
  57. if (myPlayer.weapon == 6) {Speed3 = 300}
  58. if (myPlayer.weapon == 7) {Speed3 = 100}
  59. if (myPlayer.weapon == 8) {Speed3 = 400}
  60. }
  61. var SpeedAll = 0;
  62. var Speed3 = 0;
  63. var Speed2 = 0;
  64. var BlockPW = false;
  65. var LowHeal = false;
  66. function speedWeapon2() {
  67. doNewSend(["G", [secondary, true]])
  68. doNewSend(["G", [secondary, true]]);
  69. doNewSend(["G", [secondary, true]])
  70. doNewSend(["G", [secondary, true]]);
  71. if (myPlayer.weapon == 9) {Speed2 = 600}
  72. if (myPlayer.weapon == 10) {Speed2 = 400}
  73. if (myPlayer.weapon == 12) {Speed2 = 700}
  74. if (myPlayer.weapon == 13) {Speed2 = 230}
  75. if (myPlayer.weapon == 15) {Speed2 = 1500}
  76. doNewSend(["G", [secondary, true]])
  77. doNewSend(["G", [secondary, true]]);
  78. doNewSend(["G", [secondary, true]])
  79. doNewSend(["G", [secondary, true]]);
  80. }
  81. function OldIdWeapon() {
  82. if (
  83. myPlayer.weapon == 9 ||
  84. myPlayer.weapon == 10 ||
  85. myPlayer.weapon == 11 ||
  86. myPlayer.weapon == 12 ||
  87. myPlayer.weapon == 13 ||
  88. myPlayer.weapon == 14 ||
  89. myPlayer.weapon == 15
  90. ) {
  91. doNewSend(["G", [secondary, true]]);
  92. } else {
  93. doNewSend(["G", [primary, true]]);
  94. }
  95. }
  96. function storeBuy(id, index) {
  97. doNewSend("13c", 1, id, index);
  98. }
  99. var AntiTi = false;
  100. var AutoSh = false;
  101. var AutoQ = false;
  102. var bht = false;
  103. function biomeHat() {
  104. if (myPlayer.y < 2400) {
  105. hat(15);
  106. } else {
  107. if (myPlayer.y > 6850 && myPlayer.y < 7550) {
  108. hat(31);
  109. } else {
  110. hat(12);
  111. }
  112. }
  113. }
  114. function time(a, b) {
  115. setTimeout( () => { b
  116. }, a);
  117. }
  118. let weaponSpeed = [300, 400, 400, 300, 300, 700, 300, 100, 400, 600, 400, 0, 700, 230, 700, 1500]
  119. let weaponSrc = [
  120. "hammer_1",
  121. "axe_1",
  122. "great_axe_1",
  123. "sword_1",
  124. "samurai_1",
  125. "spear_1",
  126. "bat_1",
  127. "dagger_1",
  128. "stick_1",
  129. "bow_1",
  130. "great_hammer_1",
  131. "shield_1",
  132. "crossbow_1",
  133. "crossbow_2",
  134. "grab_1",
  135. "musket_1"
  136. ]
  137. var onWeapon;
  138. document.getElementById("enterGame").addEventListener('click', autohide);
  139. var autohide = $("ot-sdk-btn-floating").remove();
  140. document.getElementById('linksContainer2').remove();
  141. document.getElementById('gameName').innerHTML = 'MyMod';
  142. document.getElementById('loadingText').innerHTML = 'V4_BETA'
  143. document.getElementById('diedText').innerHTML = "Wasted";
  144. document.getElementById('diedText').style.color = "#000000";
  145. document.getElementById("storeHolder").style = "height: 1200px; width: 450px;";
  146. document.getElementById("promoImgHolder").remove();
  147. document.querySelector("#pre-content-container").remove(); //ANTI AD
  148. $('#itemInfoHolder').css({'top':'1050px',
  149. 'left':'15px'
  150. });
  151. $("darkness").remove();
  152. $("#youtuberOf").remove();
  153. $("#adCard").remove();
  154. $("#mobileInstructions").remove();
  155. $("#downloadButtonContainer").remove();
  156. $("#mobileDownloadButtonContainer").remove();
  157. $(".downloadBadge").remove();
  158. let details = document.createElement("div");
  159. details.id = "details";
  160. document.body.prepend(details);
  161. var ping = document.getElementById("pingDisplay");
  162. ping.style.fontSize = "20px";
  163. ping.style.display = "block";
  164. ping.style.zIndex = "1";
  165. document.body.appendChild(ping);
  166. setInterval(function() {
  167. if (window.pingTime && ping) {
  168. ping.innerHTML = "Ping: " + window.pingTime + " | " + (myPlayer.hat == 45 ? "ShameTimer-[" + 30-1 + "s]" : "Shame[" + shame + "]");
  169. }
  170. }, window.pingTime ? 0 : 1e3); //Credits to [GG]GAMER (skidded shaem counter)
  171. var pingTime = window.pingTime;
  172. let lastDamageTick = 0;
  173. let HP = 100;
  174. let gameTick = 0;
  175. var shame = 0;
  176. let shameTime,
  177. damageTimes = 0;
  178. let friendlyMillLocs = [];
  179. let EnemyTrapLocs = [];
  180. let nearestFriendlyMill;
  181. let nearestFriendlyMillX;
  182. let nearestFriendlyMillY;
  183. let NearEnemyTrapLocs;
  184. let nearestFriendlyMillScale;
  185. let isNextToFriendlyMill = false;
  186. function removeArraysWithValue(arr, valueToRemove) {
  187. for (let i = arr.length - 1; i >= 0; i--) {
  188. const innerArray = arr[i];
  189. if (innerArray.includes(valueToRemove)) {
  190. arr.splice(i, 1);
  191. }
  192. }
  193. }
  194. let movementDirection
  195. let millCount = 0;
  196. let nearestRandomObjectX;
  197. let nearestRandomObjectY;
  198. let mouseX;
  199. let mouseY;
  200. let width;
  201. let height;
  202. setInterval(() => {
  203. if(hatToggle == 1) {
  204. if(oldHat != normalHat) {
  205. hat(normalHat);
  206. console.log("Tried. - Hat")
  207. }
  208. if(oldAcc != normalAcc) {
  209. acc(normalAcc);
  210. console.log("Tried. - Acc")
  211. }
  212. oldHat = normalHat;
  213. oldAcc = normalAcc
  214. }
  215. }, 25);
  216. function normal() {
  217. hat(normalHat);
  218. acc(normalAcc);
  219. }
  220. function aim(x, y){
  221. var cvs = document.getElementById("gameCanvas");
  222. cvs.dispatchEvent(new MouseEvent("mousemove", {
  223. clientX: x,
  224. clientY: y
  225. }));
  226. }
  227. let coreURL = new URL(window.location.href);
  228. window.sessionStorage.force = coreURL.searchParams.get("fc");
  229. let trap_a = null;
  230. let intrap = false;
  231. let trapid = null;
  232. var antitrap = false;
  233. var isEnemyNear;
  234. var primary;
  235. var secondary;
  236. var foodType;
  237. var wallType;
  238. var spikeType;
  239. var millType;
  240. var mineType;
  241. var boostType;
  242. var turretType;
  243. var spawnpadType;
  244. var autoaim = false;
  245. var autoprimary = false;
  246. var autosecondary = false;
  247. var tick = 1;
  248. var oldHat;
  249. var oldAcc;
  250. var enemiesNear;
  251. var normalHat;
  252. var normalAcc;
  253. var ws;
  254. var msgpack5 = msgpack;
  255. var boostDir;
  256. let myPlayer = {
  257. id: null,
  258. x: null,
  259. y: null,
  260. dir: null,
  261. object: null,
  262. weapon: null,
  263. clan: null,
  264. isLeader: null,
  265. hat: null,
  266. accessory: null,
  267. isSkull: null
  268. };
  269. let healSpeed = 50;
  270. var messageToggle = 0;
  271. var nearestEnemy;
  272. var nearestEnemyAngle;
  273. var clanToggle = 0;
  274. let healToggle = 2;
  275. let hatToggle = 1;
  276. var antiInsta = true;
  277. var autoheal = true;
  278. var instaPc = true;
  279. var antiBull = true;
  280. var autoinsta = false;
  281. var afkspike = false;
  282. var damageTick = false;
  283. var autoreload = false;
  284. var damageTrap = false;
  285. var afterInsta = false;
  286. var autoTurret = false;
  287. document.msgpack = msgpack;
  288. function n(){
  289. this.buffer = new Uint8Array([0]);
  290. this.buffer.__proto__ = new Uint8Array;
  291. this.type = 0;
  292. }
  293. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  294. WebSocket.prototype.send = function(m){
  295. if (!ws){
  296. document.ws = this;
  297. ws = this;
  298. socketFound(this);
  299. }
  300. this.oldSend(m);
  301. };
  302. function socketFound(socket){
  303. socket.addEventListener('message', function(message){
  304. handleMessage(message);
  305. });
  306. }
  307. function handleMessage(m){
  308. let temp = msgpack5.decode(new Uint8Array(m.data));
  309. let data;
  310. if(temp.length > 1) {
  311. data = [temp[0], ...temp[1]];
  312. if (data[1] instanceof Array){
  313. data = data;
  314. }
  315. } else {
  316. data = temp;
  317. }
  318. let item = data[0];
  319. if(!data) {return};
  320. update();
  321. if (item == "C" && myPlayer.id == null){
  322. myPlayer.id = data[1];
  323. }
  324. if (item == "a") {
  325. enemiesNear = [];
  326. for(let i = 0; i < data[1].length / 13; i++) {
  327. let playerInfo = data[1].slice(13*i, 13*i+13);
  328. if(playerInfo[0] == myPlayer.id) {
  329. myPlayer.x = playerInfo[1];
  330. myPlayer.y = playerInfo[2];
  331. myPlayer.dir = playerInfo[3];
  332. myPlayer.object = playerInfo[4];
  333. myPlayer.weapon = playerInfo[5];
  334. myPlayer.clan = playerInfo[7];
  335. myPlayer.isLeader = playerInfo[8];
  336. myPlayer.hat = playerInfo[9];
  337. myPlayer.accessory = playerInfo[10];
  338. myPlayer.isSkull = playerInfo[11];
  339. } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
  340. enemiesNear.push(playerInfo);
  341. }
  342. }
  343. }
  344. update();
  345. if (item == "H") {
  346. for(let i = 0; i < data[1].length / 8; i++) {
  347. let info = data[1].slice(8*i, 8*i+8);
  348. if(info[6] == millType && info[7] == myPlayer.id){
  349. friendlyMillLocs.push(info)
  350. }
  351. if(info[7] == myPlayer.id){
  352. onWeapon = true;
  353. }
  354. }
  355. }
  356. update();
  357. if(item == "Q"){
  358. removeArraysWithValue(friendlyMillLocs, data[1])
  359. }
  360. update();
  361. if(item == "R"){
  362. removeArraysWithValue(friendlyMillLocs, data[1])
  363. }
  364. update();
  365. if(item == "S"){
  366. if(data[1] == 3){
  367. millCount = data[2];
  368. }
  369. }
  370. update();
  371. if(friendlyMillLocs){
  372. nearestFriendlyMill = friendlyMillLocs.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
  373. if(nearestFriendlyMill){
  374. nearestFriendlyMillX = nearestFriendlyMill[1]
  375. nearestFriendlyMillY = nearestFriendlyMill[2]
  376. nearestFriendlyMillScale = nearestFriendlyMill[4]
  377. }
  378. }
  379. if(Math.sqrt(Math.pow((myPlayer.y-nearestFriendlyMillY), 2) + Math.pow((myPlayer.x-nearestFriendlyMillX), 2)) < nearestFriendlyMillScale + 100) {
  380. console.log(true)
  381. isNextToFriendlyMill = true;
  382. } else {
  383. isNextToFriendlyMill = false;
  384. }
  385. WebSocket.prototype.send = function(m){
  386. let xcc = new Uint8Array(m);
  387. this.oldSend(m);
  388. let realData = {};
  389. let realInfo = msgpack5.decode(xcc);
  390. if (realInfo[1] instanceof Array){
  391. realData.data = [realInfo[0], ...realInfo[1]]
  392. }
  393. let rd0 = realData.data[0];
  394. let rd1 = realData.data[1];
  395. let rd2 = realData.data[2]
  396.  
  397. if(rd0 == 'a'){
  398. movementDirection = rd1
  399. }
  400. };
  401. isEnemyNear = false;
  402. if (myPlayer.hat == 45 && shame) shameTime = 30000;
  403. if (myPlayer.hat == 45 && shame) shame = 30000;
  404. if (data[0] == "33") {
  405. gameTick++;
  406. }
  407. if(item == "O" && data[1] == myPlayer.id) {
  408. (gameTick = 0);
  409. (lastDamageTick = 0);
  410. (shame = 0);
  411. (HP = 100);
  412. (shameTime = 0);
  413. if (item == "h" && data[1] == myPlayer.id) {
  414. let damage = HP - data[2];
  415. HP = data[2];
  416. if (damage <= 0) {
  417. damageTimes++;
  418. if (!lastDamageTick) return;
  419. let healTime = gameTick - lastDamageTick;
  420. lastDamageTick = 0;
  421. if (healTime <= 1) {
  422. shame = shame++;
  423. } else {
  424. shame = Math.max(0, shame - 2);
  425. }
  426. } else {
  427. lastDamageTick = gameTick;
  428. }
  429. }
  430. var Pg = 0;
  431. if(AutoQ == true && pingTime >= 500 && pingTime - Pg) {
  432. setTimeout( () => {
  433. Pg = 3
  434. place(foodType, null);
  435. place(foodType, null);
  436. place(foodType, null);
  437. OldIdWeapon()
  438. }, pingTime - healSpeed && pingTime - Pg);
  439. }
  440. if(AutoQ == true && pingTime <= 499 && pingTime >= 101) {
  441. setTimeout( () => {
  442. Pg = 2
  443. place(foodType, null);
  444. place(foodType, null);
  445. place(foodType, null);
  446. OldIdWeapon()
  447. }, pingTime - healSpeed && pingTime - Pg);
  448. }
  449. if(AutoQ == true && pingTime <= 100 && pingTime > 50) {
  450. setTimeout( () => {
  451. Pg = 1
  452. place(foodType, null);
  453. place(foodType, null);
  454. place(foodType, null);
  455. OldIdWeapon()
  456. }, pingTime - healSpeed && pingTime - Pg);
  457. }
  458. if(AutoQ == true && pingTime <= 50) {
  459. setTimeout( () => {
  460. Pg = 4
  461. place(foodType, null);
  462. place(foodType, null);
  463. place(foodType, null);
  464. OldIdWeapon()
  465. }, pingTime && pingTime + Pg);
  466. }
  467. if(data[2] < 100 && data[2] >= 0 && damageTick == true){
  468. place(foodType)
  469. place(spikeType);
  470. doNewSend(["d",[1]]);
  471. doNewSend(["c", [0, 7, 0]]);
  472. doNewSend(["G", [primary, true]]);
  473. doNewSend(["d",[1]]);
  474. setTimeout(() => {
  475. doNewSend(["c", [0, 53, 0]]);
  476. },85);
  477. setTimeout(() => {
  478. doNewSend(["c", [0, 6, 0]]);
  479. doNewSend(["d",[0]]);
  480. place(foodType)
  481. OldIdWeapon()
  482. },170);
  483. }
  484. if(data[2] < 100 && data[2] >= 0 && afkspike == true){
  485. place(spikeType, myPlayer.dir + toRad(45));
  486. place(spikeType, myPlayer.dir - toRad(45));
  487. place(spikeType, myPlayer.dir + toRad(135));
  488. place(spikeType, myPlayer.dir - toRad(135));
  489. OldIdWeapon()
  490. }
  491. if(data[2] < 100 && data[2] >= 0 && damageTrap == true){
  492. place(boostType, myPlayer.dir + toRad(45));
  493. place(boostType, myPlayer.dir - toRad(45));
  494. place(boostType, myPlayer.dir + toRad(135));
  495. place(boostType, myPlayer.dir - toRad(135));
  496. OldIdWeapon()
  497. }
  498. if(data[2] < 100 && data[2] >= 0 && autoinsta == true){
  499. if(instaPc == true && document.activeElement.id.toLowerCase() !== 'chatbox'){
  500. afterInsta = false
  501. doNewSend(["c", [0, 53, 0]]);
  502. doNewSend(["G", [secondary, true]]);
  503. doNewSend(["d",[1]]);
  504. doNewSend(["d",[0]]);
  505. place(boostType);
  506. setTimeout(() => {
  507. doNewSend(["c", [0, 7, 0]]);
  508. doNewSend(["d",[1]]);
  509. doNewSend(["d",[0]]);
  510. }, 133);
  511. setTimeout(() => {
  512. doNewSend(["c", [0, 6, 0]]);
  513. place(spikeType)
  514. }, 180);
  515. afterInsta = true
  516. }
  517. if(instaPc == false && document.activeElement.id.toLowerCase() !== 'chatbox'){// insta
  518. afterInsta = false
  519. doNewSend(["c", [0, 53, 0]]);
  520. doNewSend(["G", [primary, true]]);
  521. setTimeout(() => {
  522. doNewSend(["c", [0, 7, 0]]);
  523. doNewSend(["d",[1]]);
  524. doNewSend(["d",[0]]);
  525. },95);
  526. setTimeout(() => {
  527. place(foodType)
  528. doNewSend(["G", [secondary, true]]);
  529. doNewSend(["d",[1]]);
  530. },180);
  531. setTimeout(() => {
  532. doNewSend(["d",[0]]);
  533. doNewSend(["G", [primary, true]])
  534. doNewSend(["c", [0, 6, 0]]);
  535. afterInsta = true
  536. },280);
  537. }
  538. }
  539. if (data[2] < 100 && data[2] >= 0 && autoheal == true) {
  540. let c;
  541. if (data[2] < 96 && data[2] >= 0) {
  542. if (LowHeal == true) {
  543. c = 1;
  544. for (let i=0;i<c;i++) { time(500, place(foodType)) };
  545. doNewSend(["c", [0, 6, 0]]);
  546. OldIdWeapon()
  547. }
  548. if (LowHeal == false) {
  549. c = 2;
  550. for (let i=0;i<c;i++) { place(foodType) };
  551. doNewSend(["c", [0, 6, 0]]);
  552. OldIdWeapon()
  553. }
  554. }
  555. }
  556. if (data[2] < 33 && data[2] > 0 && myPlayer.hat !== 6 && antiInsta == true) {//antiinsta no sold
  557. doNewSend(["c", [0, 53, 0]]);
  558. place(foodType);
  559. place(foodType);
  560. place(foodType);
  561. setTimeout(() => {
  562. place(foodType);
  563. }, 170);
  564. setTimeout(() => {
  565. doNewSend(["G", [primary, true]]);
  566. doNewSend(["c", [0, 7, 0]]);
  567. doNewSend(["d",[1]]);
  568. place(foodType);
  569. }, 760);
  570. setTimeout( () => {
  571. doNewSend(["c", [0, 6, 0]]);
  572. doNewSend(["d",[0]]);
  573. OldIdWeapon()
  574. }, 1900);
  575. }
  576. if (data[2] < 51 && data[2] > 40 && myPlayer.hat == 6 && antiInsta == true) {//antiinsta for pol
  577. doNewSend(["c", [0, 22, 0]]);
  578. place(foodType);
  579. place(foodType);
  580. place(foodType);
  581. setTimeout(() => {
  582. place(foodType);
  583. place(foodType);
  584. }, 170);
  585. setTimeout(() => {
  586. doNewSend(["G", [primary, true]]);
  587. doNewSend(["c", [0, 7, 0]]);
  588. doNewSend(["d",[1]]);
  589. }, 760);
  590. setTimeout( () => {
  591. doNewSend(["c", [0, 6, 0]]);
  592. doNewSend(["d",[0]]);
  593. OldIdWeapon()
  594. }, 1900);
  595. }
  596. if (AntiTi == true && data[2] < 100) {
  597. var oldHp = data[2]
  598. setTimeout(() => {
  599. if (oldHp != data[2] && data[2] < 70) {
  600. place(spikeType)
  601. place(foodType)
  602. place(foodType)
  603. doNewSend(["d",[1]]);
  604. doNewSend(["d",[0]]);
  605. place(foodType)
  606. place(foodType)
  607. }
  608. }, 30);
  609. setTimeout(() => {
  610. oldHp = data[2]
  611. OldIdWeapon()
  612. }, 160);
  613. }
  614. if (data[2] < 56 && data[2] > 50 && myPlayer.hat == 6 && antiBull == true) {//bullspam heal
  615. doNewSend(["d",[1]]);
  616. place(foodType);
  617. place(spikeType, - toRad(45));
  618. place(spikeType, + toRad(45));
  619. doNewSend(["c", [0, 53, 0]]);
  620. setTimeout(() => {
  621. place(foodType);
  622. place(foodType);
  623. doNewSend(["c", [0, 6, 0]]);
  624. doNewSend(["d",[0]]);
  625. OldIdWeapon()
  626. }, 133);
  627. }
  628. if (data[2] < 41 && data[2] > 0 && myPlayer.hat == !6 && antiInsta == true) {
  629. setTimeout(() => {
  630. doNewSend(["c", [0, 6, 0]]);
  631. place(foodType);
  632. place(foodType);
  633. }, 133);
  634. place(foodType);
  635. place(foodType);
  636. place(spikeType);
  637. doNewSend(["d",[1]]);
  638. doNewSend(["c", [0, 7, 0]]);
  639. doNewSend(["G", [primary, true]]);
  640. doNewSend(["d",[0]]);
  641. setTimeout(() => {
  642. place(spikeType, + toRad(45));
  643. place(spikeType, - toRad(45));
  644. doNewSend(["d",[1]]);
  645. doNewSend(["c", [0, 53, 0]]);
  646. doNewSend(["d",[0]]);
  647. doNewSend(["c", [0, 11, 0]]);
  648. },150);
  649. setTimeout(() => {
  650. doNewSend(["c", [0, 6, 0]]);
  651. OldIdWeapon()
  652. },300);
  653. }
  654. }
  655. update();
  656. };
  657. function doNewSend(sender){
  658. ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
  659. }
  660. function acc(id) {
  661. doNewSend(["c", [0, 0, 1]]);
  662. doNewSend(["c", [0, id, 1]]);
  663. }
  664.  
  665. function hat(id) {
  666. doNewSend(["c", [0, id, 0]]);
  667. }
  668. function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
  669. doNewSend(["G", [id, null]]);
  670. doNewSend(["d", [1, angle]]);
  671. doNewSend(["d", [0, angle]]);
  672. doNewSend(["G", [primary, true]]);
  673. }
  674.  
  675. var repeater = function(key, action, interval) {
  676. let _isKeyDown = false;
  677. let _intervalId = undefined;
  678.  
  679. return {
  680. start(keycode) {
  681. if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  682. _isKeyDown = true;
  683. if(_intervalId === undefined) {
  684. _intervalId = setInterval(() => {
  685. action();
  686. if(!_isKeyDown){
  687. clearInterval(_intervalId);
  688. _intervalId = undefined;
  689. }
  690. }, interval);
  691. }
  692. }
  693. },
  694.  
  695. stop(keycode) {
  696. if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  697. _isKeyDown = false;
  698. }
  699. }
  700. };
  701.  
  702.  
  703. }
  704.  
  705. let automilling = false;
  706. let automill = false;
  707. var x,
  708. y;
  709. x = myPlayer.x;
  710. y = myPlayer.y;
  711. let angle = Math.atan2(y - myPlayer.y, x - myPlayer.x);
  712. setInterval(()=>{
  713. if(automill == true && isNextToFriendlyMill == false && millCount < 300 && automilling == false){
  714. automilling = true;
  715. doNewSend(["G",[millType, null]])
  716. doNewSend(["d",[1, (movementDirection - 1.90)]])
  717. doNewSend(["G",[myPlayer.weapon, true]])
  718. doNewSend(["G",[millType, null]])
  719. doNewSend(["d",[1, (movementDirection - 3.14)]])
  720. doNewSend(["G",[myPlayer.weapon, true]])
  721. doNewSend(["G",[millType, null]])
  722. doNewSend(["d",[1, (movementDirection + 1.90)]])
  723. doNewSend(["G",[myPlayer.weapon, true]])
  724. automilling = false
  725. }
  726. }, 100);
  727. let autoturreting = false;
  728. setInterval(()=>{
  729. if(autoTurret == true && autoturreting == false){
  730. autoturreting = true;
  731. doNewSend(["G",[turretType, null]])
  732. doNewSend(["d",[1, (movementDirection - 1.90)]])
  733. doNewSend(["G",[myPlayer.weapon, true]])
  734. doNewSend(["G",[turretType, null]])
  735. doNewSend(["d",[1, (movementDirection - 3.14)]])
  736. doNewSend(["G",[myPlayer.weapon, true]])
  737. doNewSend(["G",[turretType, null]])
  738. doNewSend(["d",[1, (movementDirection + 1.90)]])
  739. doNewSend(["G",[myPlayer.weapon, true]])
  740. autoturreting = false
  741. }
  742. }, 100);
  743. let tankspam = false;
  744. let tankspamming = false;
  745. setInterval(()=>{
  746. if(tankspam == true && tankspamming == false){
  747. tankspamming = true;
  748. doNewSend(["c", [0, 40, 0]]);
  749. doNewSend(["d",[1]]);
  750. doNewSend(["d",[0]]);
  751. setTimeout(() => {
  752. doNewSend(["c", [0, 6, 0]]);
  753. speedweapon()
  754. tankspamming = false
  755. },Speed + 100);
  756. }
  757. }, Speed + 100);
  758. const boostPlacer = repeater(70, () => {place(boostType)}, 50);
  759. const spikePlacer = repeater(86, () => {place(spikeType)}, 50);
  760. const placers = [boostPlacer, spikePlacer];
  761. let prevCount = 0;
  762. const handleMutations = mutationsList => {
  763. for (const mutation of mutationsList) {
  764. if (mutation.target.id === "killCounter") {
  765. const count = parseInt(mutation.target.innerText, 10) || 0;
  766. if (count > prevCount) {
  767. doNewSend(["6", [ "GG Kills: " + count]])
  768. prevCount = count;
  769. }
  770. }
  771. }
  772. };
  773. const observer = new MutationObserver(handleMutations);
  774. observer.observe(document, {
  775. subtree: true,
  776. childList: true
  777. });
  778. document.addEventListener('keydown', (e) => {
  779. if (["allianceinput", 'chatbox', 'nameinput','storeHolder'].includes(document.activeElement.id.toLowerCase())) return null;
  780. placers.forEach(t => {
  781. t.start(e.keyCode);
  782. });
  783.  
  784. if(e.keyCode == 78 && document.activeElement.id.toLowerCase() !== 'chatbox'){// N = Automill
  785. automill = !automill
  786. }
  787.  
  788. if(e.keyCode == 16 && document.activeElement.id.toLowerCase() !== 'chatbox'){// H = Turret/Teleporter
  789. doNewSend(["c", [0, 6, 0]]);
  790. }
  791.  
  792. if(e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox'){// H = Turret/Teleporter
  793. place(turretType, myPlayer.dir + toRad(45));
  794. place(turretType, myPlayer.dir - toRad(45));
  795. }
  796. if(e.keyCode == 66 && document.activeElement.id.toLowerCase() !== 'chatbox'){// G = spawnpads
  797. place(spawnpadType, myPlayer.dir + toRad(45));
  798. place(spawnpadType, myPlayer.dir - toRad(45));
  799. }
  800. if (e.keyCode == 67) {
  801. doNewSend(["c", [0, 53, 0]]);
  802. setTimeout(() => {
  803. doNewSend(["c", [0, 7, 0]]);
  804. doNewSend(["G", [primary, true]]);
  805. doNewSend(["d",[1]]);
  806. }, 80)
  807. setTimeout(() => {
  808. doNewSend(["c", [0, 6, 0]]);
  809. doNewSend(["d",[0]]);
  810. place(spikeType, myPlayer.dir + toRad(0));
  811. place(spikeType, myPlayer.dir - toRad(180));
  812. place(spikeType, myPlayer.dir + toRad(90));
  813. place(spikeType, myPlayer.dir - toRad(90));
  814. place(spikeType, myPlayer.dir + toRad(45));
  815. place(spikeType, myPlayer.dir - toRad(45));
  816. place(spikeType, myPlayer.dir + toRad(135));
  817. place(spikeType, myPlayer.dir - toRad(135));
  818. }, 160);
  819. }
  820. if (e.keyCode == 81) {
  821. place(foodType)
  822. place(foodType)
  823. place(foodType)
  824. }
  825. if (bht == true) {
  826. setTimeout(() => {
  827. biomeHat()
  828. },150);
  829. }
  830. if(e.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox'){// spiketick
  831. place(boostType, myPlayer.dir + toRad(45));
  832. place(boostType, myPlayer.dir - toRad(45));
  833. place(boostType, myPlayer.dir + toRad(135));
  834. place(boostType, myPlayer.dir - toRad(135));
  835. place(boostType, myPlayer.dir + toRad(0));
  836. place(boostType, myPlayer.dir - toRad(180));
  837. place(boostType, myPlayer.dir + toRad(90));
  838. place(boostType, myPlayer.dir - toRad(90));
  839. }
  840. if(e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox'){// spiketick
  841. place(foodType)
  842. doNewSend(["d",[1]]);
  843. doNewSend(["c", [0, 7, 0]]);
  844. doNewSend(["G", [primary, true]]);
  845. doNewSend(["d",[1]]);
  846. setTimeout(() => {
  847. place(spikeType);
  848. doNewSend(["c", [0, 53, 0]]);
  849. },85);
  850. setTimeout(() => {
  851. doNewSend(["c", [0, 6, 0]]);
  852. doNewSend(["d",[0]]);
  853. place(foodType)
  854. },170);
  855. }
  856. if (AutoSh == true) {
  857. setTimeout(() => {
  858. storeBuy(0, 6, 0)
  859. },100);
  860. setTimeout(() => {
  861. storeBuy(0, 7, 0)
  862. },200);
  863. setTimeout(() => {
  864. storeBuy(0, 31, 0)
  865. },300);
  866. setTimeout(() => {
  867. storeBuy(0, 15, 0)
  868. },400);
  869. setTimeout(() => {
  870. storeBuy(0, 12, 0)
  871. },500);
  872. setTimeout(() => {
  873. storeBuy(0, 53, 0)
  874. },600);
  875. setTimeout(() => {
  876. storeBuy(0, 19, 1)
  877. },700);
  878. setTimeout(() => {
  879. storeBuy(0, 11, 1)
  880. },800);
  881. setTimeout(() => {
  882. storeBuy(0, 40, 0)
  883. },900);
  884. setTimeout(() => {
  885. storeBuy(0, 11, 0)
  886. },1000);
  887. setTimeout(() => {
  888. storeBuy(0, 22, 0)
  889. },1100);
  890. }
  891. if (autoreload == true && afterInsta == true) {
  892. doNewSend(["G", [secondary, true]]);
  893. speedWeapon2()
  894. setTimeout(() => {
  895. doNewSend(["G", [primary, true]]);
  896. afterInsta = false
  897. },Speed2 + 150);
  898. }
  899. if(e.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox'){// insta
  900. afterInsta == false
  901. doNewSend(["G", [primary, true]])
  902. doNewSend(["c", [0, 7, 0]]);
  903. doNewSend(["d",[1]]);
  904. doNewSend(["d",[0]]);
  905. setTimeout(() => {
  906. doNewSend(["c", [0, 21, 0]]);
  907. doNewSend(["G", [secondary, true]]);
  908. doNewSend(["d",[1]]);
  909. doNewSend(["d",[0]]);
  910. }, 95)
  911. setTimeout(() => { doNewSend(["G", [primary, true]]); doNewSend(["c", [0, 53, 0]]); place(spikeType)}, 150)
  912. setTimeout(() => { doNewSend(["c", [0, 6, 0]]); afterInsta == true}, 225)
  913. }
  914. if(e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox'){// insta
  915. afterInsta = false
  916. place(boostType)
  917. doNewSend(["c", [0, 53, 0]]);
  918. doNewSend(["G", [secondary, true]]);
  919. doNewSend(["d",[1]]);
  920. doNewSend(["d",[0]]);
  921. setTimeout(() => {
  922. doNewSend(["G", [primary, true]])
  923. doNewSend(["c", [0, 7, 0]]);
  924. doNewSend(["d",[1]]);
  925. doNewSend(["d",[0]]);
  926. },70);
  927. setTimeout(() => {
  928. doNewSend(["d",[0]]);
  929. doNewSend(["c", [0, 6, 0]]);
  930. afterInsta = true
  931. },280);
  932. }
  933. if(e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox'){// insta
  934. afterInsta = false
  935. doNewSend(["c", [0, 53, 0]]);
  936. doNewSend(["G", [secondary, true]]);
  937. doNewSend(["d",[1]]);
  938. doNewSend(["d",[0]]);
  939. setTimeout(() => {
  940. doNewSend(["G", [primary, true]])
  941. doNewSend(["c", [0, 7, 0]]);
  942. doNewSend(["d",[1]]);
  943. doNewSend(["d",[0]]);
  944. },70);
  945. setTimeout(() => {
  946. doNewSend(["d",[0]]);
  947. doNewSend(["c", [0, 6, 0]]);
  948. afterInsta = true
  949. },280);
  950. }
  951. if(e.keyCode == 82 && instaPc == true && document.activeElement.id.toLowerCase() !== 'chatbox'){// insta
  952. afterInsta = false
  953. doNewSend(["G", [primary, true]]);
  954. doNewSend(["c", [0, 7, 0]]);
  955. doNewSend(["d",[1]]);
  956. doNewSend(["d",[0]]);
  957. setTimeout(() => {
  958. place(foodType)
  959. doNewSend(["G", [secondary, true]]);
  960. doNewSend(["d",[1]]);
  961. doNewSend(["d",[1]]);
  962. },90);
  963. setTimeout(() => {
  964. place(spikeType)
  965. doNewSend(["c", [0, 53, 0]]);
  966. doNewSend(["G", [primary, true]])
  967. },180);
  968. setTimeout(() => {
  969. doNewSend(["G", [primary, true]])
  970. doNewSend(["c", [0, 6, 0]]);
  971. afterInsta = true
  972. },245);
  973. }
  974. if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox'){// insta
  975. place(boostType)
  976. place(boostType)
  977. setTimeout(() => {
  978. afterInsta = false
  979. doNewSend(["c", [0, 53, 0]]);
  980. doNewSend(["G", [secondary, true]]);
  981. doNewSend(["d",[1]]);
  982. doNewSend(["d",[0]]);
  983. setTimeout(() => {
  984. doNewSend(["G", [primary, true]])
  985. doNewSend(["c", [0, 7, 0]]);
  986. doNewSend(["d",[1]]);
  987. doNewSend(["d",[0]]);
  988. },70);
  989. setTimeout(() => {
  990. doNewSend(["d",[0]]);
  991. doNewSend(["c", [0, 6, 0]]);
  992. },280);
  993. },385);
  994. setTimeout(() => {
  995. place(spikeType)
  996. place(spikeType)
  997. afterInsta = true
  998. },435);
  999. };
  1000. if(e.keyCode == 82 && instaPc == false && document.activeElement.id.toLowerCase() !== 'chatbox'){// insta
  1001. afterInsta = false
  1002. doNewSend(["G", [primary, true]]);
  1003. doNewSend(["c", [0, 7, 0]]);
  1004. doNewSend(["d",[1]]);
  1005. doNewSend(["d",[0]]);
  1006. setTimeout(() => {
  1007. place(foodType)
  1008. doNewSend(["G", [secondary, true]]);
  1009. doNewSend(["d",[1]]);
  1010. doNewSend(["d",[1]]);
  1011. },90);
  1012. setTimeout(() => {
  1013. doNewSend(["c", [0, 53, 0]]);
  1014. doNewSend(["G", [primary, true]])
  1015. },180);
  1016. setTimeout(() => {
  1017. doNewSend(["G", [primary, true]])
  1018. doNewSend(["c", [0, 6, 0]]);
  1019. afterInsta = true
  1020. },245);
  1021. }
  1022. })
  1023. document.addEventListener("mousedown", event => {
  1024. if(event.button == 2 && document.activeElement.id.toLowerCase() !== 'chatbox'){//tankspam
  1025. tankspam = !tankspam
  1026. }
  1027. });
  1028. document.addEventListener('keyup', (e) => {
  1029. placers.forEach(t => {
  1030. t.stop(e.keyCode);
  1031. });
  1032. })
  1033. function isElementVisible(e) {
  1034. return (e.offsetParent !== null);
  1035. }
  1036.  
  1037. function toRad(angle) {
  1038. return angle * 0.01745329251;
  1039. }
  1040.  
  1041. function dist(e, o) {
  1042. return e && o
  1043. ? Math.sqrt((e.x - o.x) ** 2 + (e.y - o.y) ** 2)
  1044. : null
  1045. };
  1046. function update() {
  1047. for (let i=0;i<9;i++){
  1048. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1049. primary = i;
  1050. }
  1051. }
  1052.  
  1053. for (let i=9;i<16;i++){
  1054. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1055. secondary = i;
  1056. }
  1057. }
  1058.  
  1059. for (let i=16;i<19;i++){
  1060. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1061. foodType = i - 16;
  1062. }
  1063. }
  1064.  
  1065. for (let i=19;i<22;i++){
  1066. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1067. wallType = i - 16;
  1068. }
  1069. }
  1070.  
  1071. for (let i=22;i<26;i++){
  1072. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1073. spikeType = i - 16;
  1074. }
  1075. }
  1076.  
  1077. for (let i=26;i<29;i++){
  1078. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1079. millType = i - 16;
  1080. }
  1081. }
  1082.  
  1083. for (let i=29;i<31;i++){
  1084. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1085. mineType = i - 16;
  1086. }
  1087. }
  1088.  
  1089. for (let i=31;i<33;i++){
  1090. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1091. boostType = i - 16;
  1092. }
  1093. }
  1094.  
  1095. for (let i=33;i<36;i++){
  1096. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1097. turretType = i - 16;
  1098. }
  1099. }
  1100.  
  1101. for (let i=36;i<37;i++){
  1102. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1103. spawnpadType = i - 16;
  1104. }
  1105. }
  1106.  
  1107. for (let i=37;i<39;i++){
  1108. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  1109. turretType = i - 16;
  1110. }
  1111. }
  1112. }
  1113. (function () {
  1114. 'use strict';
  1115.  
  1116. var functionsState = {
  1117. function1: false,
  1118. function2: false,
  1119. function3: false,
  1120. function4: false,
  1121. function5: false,
  1122. function6: false,
  1123. function7: false,
  1124. function8: false,
  1125. function9: false,
  1126. function10: false,
  1127. function11: false,
  1128. function12: false,
  1129. function13: false,
  1130. function14: false,
  1131. function15: false,
  1132. function16: false,
  1133. };
  1134.  
  1135. var initialState = {
  1136. function1: true,
  1137. function2: true,
  1138. function3: true,
  1139. function4: true,
  1140. function5: false,
  1141. function6: false,
  1142. function7: false,
  1143. function8: false,
  1144. function9: false,
  1145. function10: false,
  1146. function11: false,
  1147. function12: false,
  1148. function13: false,
  1149. function14: false,
  1150. function15: false,
  1151. function16: false,
  1152. };
  1153.  
  1154. var customMenu = document.createElement('div');
  1155. customMenu.id = 'customMenu';
  1156. customMenu.style = 'position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #5a2b67; border: 1px solid #ccc; padding: 10px; text-align: center; overflow-y: auto; max-height: 400px; width: 600px; display: none; cursor: move;';
  1157. customMenu.innerHTML = `
  1158. <h2 style="margin: 0; padding-bottom: 10px;">MENU</h2>
  1159. <button class="menuButton" id="function1Button">Anti Insta</button>
  1160. <button class="menuButton" id="function2Button">Anti Bull</button>
  1161. <button class="menuButton" id="function3Button">Spike Insta</button>
  1162. <button class="menuButton" id="function4Button">Auto Heal</button>
  1163. <button class="menuButton" id="function5Button">Auto Insta</button>
  1164. <button class="menuButton" id="function6Button">Auto Reload</button>
  1165. <button class="menuButton" id="function7Button">Damage Tick</button>
  1166. <button class="menuButton" id="function8Button">Damage Trap</button>
  1167. <button class="menuButton" id="function9Button">AFK Spike</button>
  1168. <button class="menuButton" id="function10Button">AutoTurret</button>
  1169. <button class="menuButton" id="function11Button">Auto Biome Hat</button>
  1170. <button class="menuButton" id="function12Button">Auto Q</button>
  1171. <button class="menuButton" id="function13Button">Auto Shop</button>
  1172. <button class="menuButton" id="function14Button">Anti Tick</button>
  1173. <button class="menuButton" id="function15Button">Style</button>
  1174. <button class="menuButton" id="function16Button">Low Heal</button>
  1175. <hr>
  1176. <h3>Приватный чат</h3>
  1177. <input type="text" id="privateChatInput" placeholder="Введите сообщение...">
  1178. <input type="text" id="privateChatSender" placeholder="Имя отправителя">
  1179. <button class="menuButton" id="setChatKey">ключ чата</button>
  1180. <input type="text" id="privateChatKey" placeholder="Ключ чата">
  1181. <button class="menuButton" id="sendPrivateMessage">Отправить</button>
  1182. `;
  1183. document.body.appendChild(customMenu);
  1184.  
  1185. document.addEventListener('keydown', function (event) {
  1186. if (event.key === 'Escape') {
  1187. toggleMenu();
  1188. }
  1189. });
  1190.  
  1191. initializeButtons();
  1192.  
  1193. function initializeButtons() {
  1194. for (var key in initialState) {
  1195. functionsState[key] = initialState[key];
  1196. toggleButtonColor(key + 'Button', initialState[key]);
  1197. }
  1198. }
  1199.  
  1200. document.getElementById('function1Button').addEventListener('click', function () {
  1201. functionsState.function1 = !functionsState.function1;
  1202. toggleButtonColor('function1Button', functionsState.function1);
  1203. antiInsta = !antiInsta;
  1204. });
  1205.  
  1206. document.getElementById('function2Button').addEventListener('click', function () {
  1207. functionsState.function2 = !functionsState.function2;
  1208. toggleButtonColor('function2Button', functionsState.function2);
  1209. antiBull = !antiBull;
  1210. });
  1211.  
  1212. document.getElementById('function3Button').addEventListener('click', function () {
  1213. functionsState.function3 = !functionsState.function3;
  1214. toggleButtonColor('function3Button', functionsState.function3);
  1215. instaPc = !instaPc;
  1216. });
  1217.  
  1218. document.getElementById('function4Button').addEventListener('click', function () {
  1219. functionsState.function4 = !functionsState.function4;
  1220. toggleButtonColor('function4Button', functionsState.function4);
  1221. autoheal = !autoheal;
  1222. });
  1223.  
  1224. document.getElementById('function5Button').addEventListener('click', function () {
  1225. functionsState.function5 = !functionsState.function5;
  1226. toggleButtonColor('function5Button', functionsState.function5);
  1227. autoinsta = !autoinsta;
  1228. });
  1229.  
  1230. document.getElementById('function6Button').addEventListener('click', function () {
  1231. functionsState.function6 = !functionsState.function6;
  1232. toggleButtonColor('function6Button', functionsState.function6);
  1233. autoreload = !autoreload;
  1234. });
  1235.  
  1236. document.getElementById('function7Button').addEventListener('click', function () {
  1237. functionsState.function7 = !functionsState.function7;
  1238. toggleButtonColor('function7Button', functionsState.function7);
  1239. damageTick = !damageTick;
  1240. });
  1241.  
  1242. document.getElementById('function8Button').addEventListener('click', function () {
  1243. functionsState.function8 = !functionsState.function8;
  1244. toggleButtonColor('function8Button', functionsState.function8);
  1245. damageTrap = !damageTrap;
  1246. });
  1247.  
  1248. document.getElementById('function9Button').addEventListener('click', function () {
  1249. functionsState.function9 = !functionsState.function9;
  1250. toggleButtonColor('function9Button', functionsState.function9);
  1251. afkspike = !afkspike;
  1252. });
  1253. document.getElementById('function10Button').addEventListener('click', function () {
  1254. functionsState.function10 = !functionsState.function10;
  1255. toggleButtonColor('function10Button', functionsState.function10);
  1256. autoTurret = !autoTurret;
  1257. });
  1258.  
  1259. document.getElementById('function11Button').addEventListener('click', function () {
  1260. functionsState.function11 = !functionsState.function11;
  1261. toggleButtonColor('function11Button', functionsState.function11);
  1262. bht = !bht;
  1263. });
  1264.  
  1265. document.getElementById('function12Button').addEventListener('click', function () {
  1266. functionsState.function12 = !functionsState.function12;
  1267. toggleButtonColor('function12Button', functionsState.function12);
  1268. AutoQ = !AutoQ;
  1269. });
  1270.  
  1271. document.getElementById('function13Button').addEventListener('click', function () {
  1272. functionsState.function13 = !functionsState.function13;
  1273. toggleButtonColor('function13Button', functionsState.function13);
  1274. AutoSh = !AutoSh;
  1275. });
  1276.  
  1277. document.getElementById('function14Button').addEventListener('click', function () {
  1278. functionsState.function14 = !functionsState.function14;
  1279. toggleButtonColor('function14Button', functionsState.function14);
  1280. AntiTi = !AntiTi;
  1281. });
  1282.  
  1283. document.getElementById('function15Button').addEventListener('click', function () {
  1284. functionsState.function15 = !functionsState.function15;
  1285. toggleButtonColor('function15Button', functionsState.function15);
  1286. BlockPW = !BlockPW;
  1287. });
  1288.  
  1289. document.getElementById('function16Button').addEventListener('click', function () {
  1290. functionsState.function16 = !functionsState.function16;
  1291. toggleButtonColor('function16Button', functionsState.function16);
  1292. LowHeal = !LowHeal;
  1293. });
  1294.  
  1295. document.getElementById('setChatKey').addEventListener('click', function () {
  1296. setChatKey();
  1297. });
  1298.  
  1299. document.getElementById('setChatKey').addEventListener('click', function () {
  1300. setChatKey();
  1301. });
  1302.  
  1303. function toggleMenu() {
  1304. var menu = document.getElementById('customMenu');
  1305. menu.style.display = (menu.style.display === 'none' || menu.style.display === '') ? 'block' : 'none';
  1306. }
  1307.  
  1308. function toggleButtonColor(buttonId, isActive) {
  1309. var button = document.getElementById(buttonId);
  1310. button.style.backgroundColor = isActive ? '#4CAF50' : '#FF0000';
  1311. button.style.color = '#fff';
  1312. }
  1313.  
  1314. function setChatKey() {
  1315. var chatKeyInput = document.getElementById('privateChatKey');
  1316. var chatKey = chatKeyInput.value.trim();
  1317. }
  1318.  
  1319. function sendPrivateMessage() {
  1320. var messageInput = document.getElementById('privateChatInput');
  1321. var message = messageInput.value.trim();
  1322. var senderInput = document.getElementById('privateChatSender');
  1323. var sender = senderInput.value || 'Вы';
  1324. var chatKeyInput = document.getElementById('privateChatKey');
  1325. var chatKey = chatKeyInput.value;
  1326.  
  1327. if (message !== '' && chatKey === 'Nigger666') {
  1328. appendMessageToChat(message, sender);
  1329. messageInput.value = '';
  1330. }
  1331. }
  1332.  
  1333. var privateChatMessages = document.createElement('div');
  1334. privateChatMessages.id = 'privateChatMessages';
  1335. privateChatMessages.style = 'max-height: 200px; overflow-y: auto; margin-top: 10px;';
  1336.  
  1337. customMenu.appendChild(privateChatMessages);
  1338.  
  1339. function appendMessageToChat(message, sender) {
  1340. var messageElement = document.createElement('div');
  1341. messageElement.innerHTML = `<strong>${sender}:</strong> ${message}`;
  1342. privateChatMessages.appendChild(messageElement);
  1343.  
  1344. privateChatMessages.scrollTop = privateChatMessages.scrollHeight;
  1345. }
  1346. })();
  1347.  
  1348. (function() {
  1349. const { msgpack } = window
  1350.  
  1351. function AntiKick() {
  1352. this.resetDelay = 500
  1353. this.packetsLimit = 40
  1354.  
  1355. this.ignoreTypes = [ "pp", "rmd" ]
  1356. this.ignoreQueuePackets = [ "5", "c", "33", "2", "7", "13c" ]
  1357.  
  1358. this.packetsStorage = new Map()
  1359. this.tmpPackets = []
  1360. this.packetsQueue = []
  1361.  
  1362. this.lastSent = Date.now()
  1363.  
  1364. this.onSend = function(data) {
  1365. const binary = new Uint8Array(data)
  1366. const parsed = msgpack.decode(binary)
  1367.  
  1368. if (Date.now() - this.lastSent > this.resetDelay) {
  1369. this.tmpPackets = []
  1370.  
  1371. this.lastSent = Date.now()
  1372. }
  1373.  
  1374. if (!this.ignoreTypes.includes(parsed[0])) {
  1375. if (this.packetsStorage.has(parsed[0])) {
  1376. const oldPacket = this.packetsStorage.get(parsed[0])
  1377.  
  1378. switch (parsed[0]) {
  1379. case "2":
  1380. case "33":
  1381. if (oldPacket[0] == parsed[1][0]) return true
  1382. break
  1383. }
  1384. }
  1385.  
  1386. if (this.tmpPackets.length > this.packetsLimit) {
  1387. if (!this.ignoreQueuePackets.includes(parsed[0])) {
  1388. this.packetsQueue.push(data)
  1389. }
  1390.  
  1391. return true
  1392. }
  1393.  
  1394. this.tmpPackets.push({
  1395. type: parsed[0],
  1396. data: parsed[1]
  1397. })
  1398.  
  1399. this.packetsStorage.set(parsed[0], parsed[1])
  1400. }
  1401.  
  1402. return false
  1403. }
  1404. }
  1405.  
  1406. const antiKick = new AntiKick()
  1407.  
  1408. let firstSend = false
  1409.  
  1410. window.WebSocket.prototype.send = new Proxy(window.WebSocket.prototype.send, {
  1411. apply: function(target, _this) {
  1412. if (!firstSend) {
  1413. _this.addEventListener("message", (event) => {
  1414. if (!antiKick.packetsQueue.length) return
  1415.  
  1416. const binary = new Uint8Array(event.data)
  1417. const parsed = msgpack.decode(binary)
  1418.  
  1419. if (parsed[0] === "33") {
  1420. _this.send(antiKick.packetsQueue[0])
  1421.  
  1422. antiKick.packetsQueue.shift()
  1423. }
  1424. })
  1425.  
  1426. firstSend = true
  1427. }
  1428.  
  1429. if (antiKick.onSend(arguments[2][0])) return
  1430.  
  1431. return Reflect.apply(...arguments)
  1432. }
  1433. })
  1434. })()