myMod 2

V - spike, F - trap, - H - 2 turrets, SPACE - spikeHit, R - insta, C - 4 spikes, RightMouse - tankspam, O - qadro boost/trap, ESC - menu beta, T - reverse insta, G - beta one tick boost.

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

QingJ © 2025

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