_-*.:GPT-MOD:.*-_

Autobreak-trap, Autoheal, Hat macros, Anti-trap, AutoPush & more!

目前为 2024-12-30 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name _-*.:GPT-MOD:.*-_
  3. // @description Autobreak-trap, Autoheal, Hat macros, Anti-trap, AutoPush & more!
  4. // @version s.2
  5. // @author Thiago
  6. // @match *://sploop.io/*
  7. // @run-at document-start
  8. // @require http://code.jquery.com/jquery-3.3.1.min.js
  9. // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
  10. // @grant none
  11. // @namespace https://greasyfork.org/users/761829
  12. // ==/UserScript==
  13.  
  14. const { log } = console;
  15. var autoChoose = true; // SET TO false IF YOU WANT TO DISABLE
  16. let version = "3.2.3.1"
  17. let wsPushing = false
  18. let Game;
  19. let Entity = new Array();
  20. let Canvas;
  21. let Context;
  22. let ctx;
  23. let keyDown = [];
  24. let user = {};
  25. let tribe = [];
  26. let enemy;
  27. let encoder = new TextEncoder();
  28. let decoder = new TextDecoder();
  29. let server;
  30. let teammates = [];
  31.  
  32. let Config = {
  33. update: (type) => {
  34. Config[type] += 1;
  35. setTimeout(() => (Config[type] -= 1), 1e3);
  36. },
  37. serverUpdate: 1e3 / 9,
  38. breaking: false,
  39. pushing: false,
  40. rate: 1e3,
  41. pps: 0,
  42. weapon: 0,
  43. cps: 0,
  44. tps: 0,
  45. fps: 0,
  46. ping: 0,
  47. enemiesNear: [],
  48. freeze: {
  49. send: true,
  50. pps: true,
  51. message: false,
  52. setup: false
  53. },
  54. angle: 0,
  55. move: 0,
  56. messages: new Array([], []),
  57. counter: 0,
  58. resolver: function () {
  59. },
  60. last: Date.now(),
  61. chat: ["♫©§☼­<­◄­ø▲►>§²¯-_®♫♀↨§", "OW U ME HACK X.+*!-?", "MI HACK IS GPT BEST HACK", "MI HACK IS GPT BEST HACK", "AND THE HACK IS CREATED BY I", "", "IS", "PRO NO noob¡"] ,
  62. isJson: (data) => {
  63. try {
  64. JSON.parse(data);
  65. } catch (e) {
  66. return false;
  67. }
  68. return true;
  69.  
  70. },
  71. WS: null
  72. };
  73.  
  74. Config.tick = () => {
  75. return new Promise((e) => (Config.resolver = e))
  76. };
  77.  
  78. let Toggle = {
  79. UI: true,
  80. autoBreak: true,
  81. autoPush: true,
  82. autoPlace: true,
  83. autoSync: true,
  84. autoRespawn: false,
  85. autoChat: false,
  86. tracers: true,
  87. autoHeal: true,
  88. optHeal: false,
  89. }
  90.  
  91. class Macro {
  92. constructor(advanced, spike, trap, mill, food) {
  93. this.advanced = advanced;
  94. this.spike = spike;
  95. this.trap = trap;
  96. this.mill = mill;
  97. this.food = food;
  98. };
  99.  
  100. update() {
  101. setTimeout(() => {
  102.  
  103. if (keyDown[this.spike]) Sploop.newPlace(4);
  104. if (keyDown[this.trap]) Sploop.newPlace(7);
  105. if (keyDown[this.mill]) Sploop.newPlace(5);
  106. if (keyDown[this.food]) Sploop.newPlace(2);
  107. }, 14);
  108. };
  109. };
  110.  
  111. let Placer = new Macro(true, 86, 70, 78, 81);
  112.  
  113. class Sploop {
  114. static place(id, angle = Config.angle) {
  115. Config.update('cps');
  116. Sploop.take(id);
  117. Sploop.hit(angle);
  118. Sploop.take(Config.weapon);
  119. }
  120.  
  121. static newPlace(id, angle = Config.angle) {
  122. let increasor = Math.PI / 8; // 22.25 radians
  123. let offset = Math.PI / 4; // 45 radians
  124.  
  125. this.place(id, angle, true)
  126.  
  127. for (let newAngle = 0; newAngle < offset; newAngle += increasor) {
  128. Sploop.place(id, angle - newAngle);
  129. Sploop.place(id, angle + newAngle);
  130. }
  131.  
  132. Sploop.take(Config.weapon);
  133. }
  134.  
  135. static quad(id, angle = 0) {
  136. for (let newAngle = 0; newAngle < Math.PI * 2; newAngle += Math.PI / 8) {
  137. let time = (Config.serverUpdate / 4) * (newAngle / (Math.PI / 8))
  138.  
  139. setTimeout(() => Sploop.place(7, angle + newAngle), time);
  140. }
  141. }
  142.  
  143. static heal(amount) {
  144. for (let count = 0; count <= amount; count++) Sploop.place(2);
  145. }
  146.  
  147. static equip(id) {
  148. if (user.skin != id) Game.send(new Uint8Array([5, id]));
  149. }
  150.  
  151. static walk(angle = Config.move) {
  152. if (typeof angle !== 'number') return Game.send(new Uint8Array([1, 0]));
  153.  
  154. angle = (65535 * (angle + Math.PI)) / (2 * Math.PI);
  155.  
  156. Game.send(new Uint8Array([1, 255 & angle, (angle >> 8) & 255]));
  157. }
  158.  
  159. static take(id) {
  160. Game.send(new Uint8Array([0, id]));
  161. }
  162.  
  163. static chat(text) {
  164. text = encoder.encode(text);
  165.  
  166. Game.send(new Uint8Array([7, ...text]))
  167. }
  168.  
  169. static hit(angle) {
  170. angle = (65535 * (angle + Math.PI)) / (2 * Math.PI);
  171.  
  172. Game.send(new Uint8Array([19, 255 & angle, (angle >> 8) & 255]));
  173. Game.send(new Uint8Array([18]));
  174. }
  175.  
  176. static watch(angle) {
  177. angle = (65535 * (angle + Math.PI)) / (2 * Math.PI);
  178.  
  179. Game.send(new Uint8Array([13, 255 & angle, (angle >> 8) & 255]));
  180. }
  181.  
  182. static offensive() {
  183. let offensive = () => {
  184. let distance = enemy ? getDistance(enemy, user) : 0;
  185.  
  186. if (user.y <= 9e3 && user.y >= 8e3) return 9;
  187. if (enemy && distance <= 300) return false && distance <= 150 ? 6 : 5;
  188.  
  189. return 7;
  190. }
  191.  
  192. Sploop.equip(offensive());
  193. }
  194.  
  195. static healthChange(health, oldHealth) {
  196. if (oldHealth > health) {
  197. user.hitDate = Config.counter;
  198. }
  199. ;
  200.  
  201. user.health = health;
  202. }
  203.  
  204. /* static mine(build){
  205. if(user.id2 == build.id2) return true;
  206. if(user.team){
  207. let length = tribe.length;
  208. for(let index = 0; index < length; index++) {
  209. let teammate = tribe[index];
  210. if(build.id2 == teammate.id2) return true;
  211. }
  212. }
  213. return false;
  214. }*/
  215.  
  216. static update() {
  217. Config.counter += 1;
  218. Config.resolver();
  219. Config.last = Date.now();
  220.  
  221. if (user.alive) {
  222. if (user.health < 100 && Toggle.autoHeal) {
  223. log("damage")
  224. setTimeout(() => {
  225. Sploop.heal(1);
  226. }, Toggle.optHeal ? (Config.serverUpdate - 20 - Config.ping) + parseInt(document.querySelector('[data-speed="addms"]').value) : parseInt(document.querySelector('[data-speed="heal"]').value));
  227. }
  228. ;
  229.  
  230. let trap = Entity.find(c => c && getDistance(c, user) <= 50 && c.type == 6 && !teammates.includes(c.id2) && user.id2 !== c.id2);
  231. let wasBreaking = Config.breaking;
  232. Config.breaking = false;
  233.  
  234. if (trap && Toggle.autoBreak) {
  235. console.log(trap, user)
  236. let angle = getAngle(trap, user);
  237. Config.breaking = true;
  238. Sploop.chat("");
  239.  
  240. Sploop.hit(angle);
  241. Sploop.equip(6);
  242.  
  243. if (!wasBreaking) Sploop.quad(7, angle);
  244. } else if (wasBreaking) {
  245. Sploop.chat("");
  246. Sploop.offensive();
  247. }
  248.  
  249. let wasPushing = Config.pushing;
  250. Config.pushing = false;
  251.  
  252. if (enemy && !trap && user.alive) {
  253. let distance = getDistance(enemy, user);
  254.  
  255. if (Toggle.autoPush && distance <= 250) {
  256. let trap = Entity.find(c => c && getDistance(c, enemy) <= 60 && c.type == 6 && c.id !== enemy.id);
  257.  
  258. if (wsPushing && !trap) {
  259. wsPushing = false;
  260. Sploop.walk('stop');
  261. }
  262.  
  263. if (trap) {
  264. let spikes = Entity.filter(c => c && [2, 7, 17].includes(c.type) && c.id !== enemy.id && getDistance(c, trap) <= 130);
  265. if (wsPushing && !spikes.length) {
  266. wsPushing = false;
  267. Sploop.walk('stop');
  268. }
  269. if (spikes.length) {
  270. let spike = spikes.sort((a, b) => getDistance(a, trap) - getDistance(b, trap))[0];
  271. let angle = getAngle(enemy, spike);
  272. distance = getDistance(enemy, spike) + 70;
  273. let position = {
  274. x: spike.x + (distance * Math.cos(angle)),
  275. y: spike.y + (distance * Math.sin(angle))
  276. };
  277.  
  278. distance = getDistance(position, user);
  279. angle = () => {
  280. wsPushing = true;
  281. if (distance > 100) {
  282. return getAngle(position, user)
  283. } else {
  284. let angleDifference = Math.abs(getAngle(spike, position) - getAngle(spike, user))
  285. let message = `diffence [${angleDifference / (Math.PI / 180)}]`
  286.  
  287. Sploop.chat(`INFINITED-$XD{(angleDifference / (Math.PI / 180)).toFixed(3)}`)
  288. // Sploop.chat(message);
  289. return getAngle(enemy, user)
  290. }
  291. }
  292.  
  293. Config.pushing = true;
  294. Sploop.walk(angle())
  295. }
  296. }
  297. }
  298.  
  299. distance = getDistance(enemy, user)
  300. if (Toggle.autoPlace && distance <= 200) {
  301. let trap = Entity.find(c => c && c.type == 6 && enemy.id !== c.id && getDistance(c, enemy) <= 50);
  302. let enemyPos = {
  303. x: enemy.x + enemy.xVel,
  304. y: enemy.y + enemy.yVel
  305. }
  306. let userPos = {
  307. x: user.x + user.xVel,
  308. y: user.y + user.yVel
  309. }
  310. distance = getDistance(enemyPos, userPos);
  311. let angle = getAngle(enemyPos, userPos)
  312. let range = 28 * 2 + 50;
  313.  
  314. if (trap) {
  315. angle = getAngle(trap, userPos);
  316. setTimeout(() => {
  317. Sploop.place(4, angle + (50 * Math.PI / 180));
  318. }, 14)
  319.  
  320. } else {
  321. if (Toggle.autoSync && distance < 250) {
  322. let spike = Entity.find(c => c && [2, 7, 17].includes(c.type) && c.id !== enemy.id && getDistance(c, enemyPos) <= 60);
  323. if (spike) {
  324. Sploop.equip(2);
  325. Sploop.take(0);
  326. Sploop.hit(angle);
  327. setTimeout(() => Sploop.offensive(), 2e3);
  328. }
  329. if (enemy.health <= (enemy.skin == 2 ? 78 : 85) && user.skin == 5 && user.health <= 70) {
  330. Sploop.equip(2);
  331. Sploop.take(0);
  332. Sploop.hit(angle);
  333. setTimeout(() => Sploop.offensive(), 2e3);
  334. }
  335. }
  336.  
  337. if (range >= distance) {
  338. setTimeout(() => {
  339. Sploop.place(7, angle);
  340. }, 14)
  341. }
  342. }
  343. }
  344. }
  345.  
  346. if (wasPushing && !Config.pushing) Sploop.walk('Stop');
  347. }
  348.  
  349. updateInfo()
  350. }
  351. }
  352.  
  353.  
  354.  
  355.  
  356. class Script {
  357. setup() {
  358. this.run();
  359. };
  360.  
  361. /*override(ws, data){
  362. !Config.freeze.send && this.log(`WebSocket`, `⬈`, data[0], '#8ecc51');
  363. if(Config.isJson(data)) {
  364. let oldws = JSON.parse(data)
  365. if(oldws[0] == 6) {
  366. user.name = oldws[1]
  367. }
  368. }
  369. ws.classic(data, true);
  370. Config.update('pps');
  371. }*/
  372.  
  373. send(data) {
  374. if (this.ws && 1 === this.ws.readyState) {
  375. if (Config.pps >= 400) return // Reduce the packet limit to do not get kicked
  376.  
  377. this.ws.send(data)
  378. Config.update('pps');
  379. }
  380. }
  381.  
  382. message(event) {
  383. let data = event.data;
  384. let string = typeof data === 'string';
  385. let decoded = string ? JSON.parse(data) : new Uint8Array(data);
  386. let length = decoded.length;
  387. let id = Number(decoded[0]);
  388. let found = Config.messages[Number(string)].find(item => item && item.id == id);
  389.  
  390. if (!found) return !Config.freeze.message && Game.log(`WebSocket`, `⬉`, `${decoded} | ${string}`, '#c7cc51');
  391. switch (decoded[0]) {
  392. case 20:
  393. Config.enemiesNear = []
  394. enemy = null;
  395. for (let int = 1; int < length; int += 19) {
  396. let type = decoded[int],
  397. owner = decoded[int + 1],
  398. index = decoded[int + 2] | decoded[int + 3] << 8,
  399. x = decoded[int + 4] | decoded[int + 5] << 8,
  400. y = decoded[int + 6] | decoded[int + 7] << 8,
  401. broken = decoded[int + 8],
  402. skin = decoded[int + 11],
  403. team = decoded[int + 12],
  404. health = decoded[int + 13] / 255 * 100,
  405. clown = decoded[int + 8];
  406.  
  407. let temp = Entity[index] || {};
  408.  
  409. if (2 && broken) Entity[index] = null;
  410.  
  411. if (!type && broken == 2) {
  412. temp = {};
  413. } else {
  414. temp.type = type;
  415. temp.id = index;
  416. temp.health = health;
  417. temp.xVel = temp.x - x;
  418. temp.yVel = temp.y - y;
  419. temp.speed = Math.hypot(y - temp.y, x - temp.x);
  420. temp.move = Math.atan2(y - temp.y, x - temp.x);
  421. temp.x = x;
  422. temp.y = y;
  423. temp.id2 = owner;
  424. temp.skin = skin;
  425. temp.team = team;
  426. temp.clown = Boolean(clown);
  427. Config.enemiesNear.push(temp)
  428.  
  429. Entity[index] = temp;
  430. }
  431.  
  432. if (temp.id === user.id) {
  433. Sploop.healthChange(temp.health, user.health);
  434. Object.assign(user, temp)
  435. } else if (!temp.type && (!user.team || temp.team != user.team)) {
  436. let distance = Math.hypot(user.y - temp.y, user.x - temp.x);
  437. let distance2 = enemy ? Math.hypot(user.y - enemy.y, user.x - enemy.x) : null;
  438. if (enemy) {
  439. if (distance < distance2) enemy = temp;
  440. } else {
  441. enemy = temp;
  442. }
  443. }
  444.  
  445. }
  446. Config.update('tps');
  447. Sploop.update();
  448. break;
  449.  
  450. case 35:
  451. user.id = decoded[1];
  452. user.alive = true;
  453. user.spawnDate = Date.now();
  454. user.health = 100;
  455. Config.weapon = 0;
  456. break;
  457. case 19:
  458. user.health = 0;
  459. user.speed = 0;
  460. user.alive = false;
  461. if (Toggle.autoRespawn) {
  462. setTimeout(() => {
  463. Game.send(Config.respawnPacket)
  464. }, 200)
  465. }
  466. break;
  467.  
  468. case 28:
  469. Sploop.chat("~D.E.S.T.R.O.Y.E.D~")
  470. break;
  471.  
  472. case 24:
  473. teammates = [...data.slice(3, data.length)];
  474. break;
  475.  
  476. case 16:
  477. teammates = [...data.slice(2, data.length)];
  478. break;
  479.  
  480. case 27:
  481. teammates = [];
  482. break;
  483.  
  484. /* case 'Ping update':
  485. Config.ping = decoded[1] | (decoded[2] << 8);
  486. break;*/
  487. }
  488.  
  489. Placer.update();
  490. }
  491.  
  492. log(group, symbol, result, color) {
  493. return log(`%c[${group}] %c${symbol}`, `color:${color};font-weight:bold`, `color:${color}`, result);
  494. }
  495.  
  496. run(ws) {
  497. let chatval = 0
  498. setInterval(() => {
  499. if (Toggle.autoChat) {
  500. if (chatval == Config.chat.length) {
  501. chatval = 0;
  502. } else {
  503. if (user.alive && Toggle.autoChat) {
  504. chatval++
  505. Sploop.chat(Config.chat[chatval])
  506. }
  507. }
  508. }
  509. }, 1000)
  510. let val = [1, 2, 4, 8]
  511. let lval = 0
  512. setInterval(() => {
  513. if (Toggle.antiAFK) {
  514. lval++
  515. Game.send(new Uint8Array([1, val[lval - 1]]))
  516. setTimeout(() => {
  517. Game.send(new Uint8Array([1, 0]))
  518. }, 200)
  519. if (lval == val.length) {
  520. lval = 0
  521. }
  522. }
  523. }, 5000)
  524. !Config.freeze.setup && Game.log(`Hijacked Iframe`, `✔`, ws.url, '#0f0');
  525. let notifications = `
  526. <div class="notifications-holder"></div>
  527. <style>
  528. .box span {
  529. font-size: 20px;
  530. white-space: nowrap;
  531. }
  532. .box {
  533. width: max-content;
  534. height: 40px;
  535. display: flex;
  536. align-items: center;
  537. padding-top: 3.5px;
  538. padding-left: 7px;
  539. padding-right: 7px;
  540. border-radius: 7px;
  541. background-color: rgb(40 45 34 / 60%);
  542. border: 4px solid #141414;
  543. margin-bottom: 5px;
  544. color: white;
  545. letter-spacing: 1px;
  546. font-weight: bold;
  547. box-shadow: inset 0 -3px 0 #333;
  548. }
  549. .notifications-holder {
  550. position: absolute;
  551. left: 20px;
  552. top: 20px;
  553. display: flex;
  554. flex-direction: column;
  555. z-index: 5;
  556. }
  557. </style>
  558. `
  559. $("body").append(notifications)
  560. addNotifications(`The script is running!`, "#5c4ce6")
  561. this.ws = ws;
  562.  
  563. /* let infoPanel = '\n<div class="info-panel-holder">\n <div id="info-content">\n <p id="health"></div>\n</div>\n<style>\n#info-content {\n color: #fff;\n font-size: 22px;\n text-shadow: 0px 0px 5px black, 0px 0px 7px black;\n}\n.info-panel-holder {\n position: absolute;\n top: 20px;\n left: 20px;\n}\n</style>\n';
  564. $("body").append(infoPanel)*/
  565.  
  566. setInterval(() => {
  567. !Config.freeze.pps && this.log(`PPS`, `⬍`, Config.pps, '#516ecc');
  568. }, Config.rate);
  569.  
  570. Config.width = Canvas.clientWidth;
  571. Config.height = Canvas.clientHeight;
  572.  
  573. $(window).resize(() => {
  574. Config.width = Canvas.clientWidth;
  575. Config.height = Canvas.clientHeight;
  576. });
  577.  
  578. Canvas.addEventListener('mousemove', (event) => {
  579. Config.mouseX = event.clientX;
  580. Config.mouseY = event.clientY;
  581. Config.angle = Math.atan2(Config.mouseY - Config.height / 2, Config.mouseX - Config.width / 2);
  582. });
  583.  
  584. }
  585.  
  586. constructor() {
  587. this.ws = null;
  588. }
  589. };
  590.  
  591. const Setup = () => {
  592. Game = new Script();
  593. Game.log(`Setup`, `⦿`, '', '#000000');
  594. let data = Config.messages;
  595.  
  596. data[0][1] = { name: 'Player update', string: false };
  597. data[0][2] = { name: 'Verify', string: false };
  598. data[0][5] = { name: 'Choose', string: false };
  599. data[0][7] = { name: 'Hit', string: false };
  600. data[0][14] = { name: 'Resource update', string: false };
  601. data[0][16] = { name: 'Projectile Hit', string: false };
  602. data[0][18] = { name: 'Chat', string: false };
  603. data[0][19] = { name: 'Choose x3', string: true };
  604. data[0][20] = { name: 'Choose x2', string: false };
  605. data[0][22] = { name: 'Ping update', string: false };
  606. data[0][23] = { name: 'Ping update', string: false };
  607. data[0][24] = { name: 'Create clan', string: false };
  608. data[0][25] = { name: 'Leave clan', string: false };
  609. data[0][26] = { name: 'Create clan', string: false };
  610. data[0][27] = { name: 'Leave clan', string: false };
  611. data[0][30] = { name: 'Place', string: false };
  612.  
  613. data[1][2] = { name: 'Spawn', string: true };
  614. data[1][8] = { name: 'Player setup', string: true };
  615. data[1][9] = { name: 'Leaderboard update', string: true };
  616. data[1][11] = { name: 'Text', string: true };
  617. data[1][13] = { name: 'Death', string: true };
  618. data[1][19] = { name: 'Choose', string: true };
  619. data[1][35] = { name: 'new Verify', string: true };
  620.  
  621. for (let index = 0; index <= 1; index++) {
  622. let length = data[index].length;
  623. for (let id = 0; id < length; id++) {
  624. if (data[index][id]) data[index][id].id = id;
  625. }
  626. ;
  627. }
  628. ;
  629. };
  630. Setup();
  631. /*
  632. class Nuro extends WebSocket {
  633. constructor(url, protocols) {
  634. Config.WS = super(url, protocols);
  635. this.addEventListener('message', event => Game.message(event));
  636. this.classic = this.send;
  637. this.send = data => Game.override(this, data);
  638. window.ws = this;
  639. Game.run(this);
  640. }
  641. set onmessage(f) {
  642. !Config.freeze.setup && log('onmessage', f);
  643. super.onmessage = f;
  644. }
  645. }
  646. */
  647.  
  648. // there you go
  649.  
  650. WebSocket.prototype.unmodifiedSend = WebSocket.prototype.send;
  651. WebSocket.prototype.send = function (arguments) {
  652. this.unmodifiedSend(arguments);
  653. if (window.ws !== this) {
  654. this.addEventListener('message', event => Game.message(event));
  655. this.classic = this.send;
  656. window.ws = this;
  657. Game.run(this);
  658. Config.WS = this.url;
  659. }
  660. }
  661.  
  662. // r <3
  663.  
  664.  
  665. let blockReact = ['clan-menu-clan-name-input', 'nickname', 'chat'];
  666.  
  667. const keyChange = (event, down) => {
  668. if (blockReact.includes(document.activeElement.id.toLowerCase())) return `Blocked key change.`
  669. keyDown[event.keyCode] = down;
  670.  
  671. let isPrimary = [49, 97].includes(event.keyCode);
  672. let isSecondary = [50, 98].includes(event.keyCode);
  673. console.debug(event.code)
  674. if (event.code == 'KeyY') {
  675. let katana = [1, 12, 9, 19, 20, 15, 8, 17, 16];
  676. katana.forEach(e => Game.send(new Uint8Array([14, e])));
  677. }
  678.  
  679. if (down && (isPrimary || isSecondary)) Config.weapon = Number(isSecondary);
  680. switch (event.code) {
  681. case "ShiftLeft":
  682. Sploop.take(Config.weapon);
  683. break
  684. case document.querySelector('[data-key="instakill"]').value:
  685. log("InstaKill")
  686. break
  687. case document.querySelector('[data-key="crystalgear"]').value:
  688. Sploop.equip(4)
  689. break
  690. case document.querySelector('[data-key="boosthat"]').value:
  691. Sploop.equip(7)
  692. break;
  693. case document.querySelector('[data-key="berserkergear"]').value:
  694. Sploop.equip(2)
  695. break
  696. case document.querySelector('[data-key="spikegear"]').value:
  697. Sploop.equip(5)
  698. break;
  699. case document.querySelector('[data-key="Demolist"]').value:
  700. Sploop.equip(11)
  701. break;
  702. }
  703. Placer.update();
  704. };
  705.  
  706. setInterval(Placer.update, 75);
  707.  
  708. document.addEventListener("keydown", (event) => keyChange(event, true));
  709. document.addEventListener("keyup", (event) => keyChange(event, false));
  710.  
  711. const getDistance = (player, player2) => {
  712. return Math.sqrt(Math.pow((player.x - player2.x), 2) + Math.pow((player.y - player2.y), 2));
  713. }
  714.  
  715. const getAngle = (player, player2) => {
  716. return Math.atan2(player.y - player2.y, player.x - player2.x)
  717. }
  718.  
  719. const encodeSym = Symbol();
  720. let init
  721. const ReqFrame = requestAnimationFrame;
  722. window.requestAnimationFrame = function () {
  723. Config.update("fps");
  724. ReqFrame.apply(this, arguments);
  725. }
  726.  
  727.  
  728. let updateInfo = () => {
  729. if (user && user.alive) {
  730. let Display = ``;
  731. let addText = (text = '') => {
  732. Display += (text + '<br/>')
  733. }
  734.  
  735. addText(`health: ${Math.round(user.health)}/100`);
  736. addText(`push: o${Config.pushing ? 'n' : 'ff'}line`);
  737. addText(`stuck: ${Config.breaking ? 'yes' : 'no'}`);
  738. addText(`speed: ${Math.round(user.speed)}`);
  739. addText();
  740. addText(`cps: ${Config.cps}`);
  741. addText(`pps: ${Config.pps}`);
  742. addText(`tps: ${Config.tps}`);
  743. addText(`fps: ${Config.fps}`);
  744. if (!Toggle.UI) {
  745. Display = ""
  746. }
  747. $("#info-content").html(Display)
  748. }
  749. ;
  750. }
  751. var ctx2d
  752. const gctx = CanvasRenderingContext2D.prototype.clearRect;
  753. CanvasRenderingContext2D.prototype.clearRect = function () {
  754. if (this.canvas.id === "game-canvas") {
  755. Canvas = this.canvas
  756. Context = Canvas.getContext("2d")
  757. ctx2d = this;
  758. }
  759. return gctx.apply(this, arguments);
  760. }
  761.  
  762. /* Tracers */
  763. let dlo = 0, dlod = Date.now()
  764.  
  765. function tracer(x, y, mx, my, color) {
  766. Context.save()
  767. Context.lineCap = "round"
  768. Context.lineWidth = 5
  769. Context.globalAlpha = .50
  770. Context.beginPath()
  771. Context.lineDashOffset = -dlo
  772. Context.strokeStyle = color
  773. Context.moveTo(mx, my)
  774. Context.lineTo(x, y)
  775. Context.stroke()
  776. Context.restore()
  777. }
  778.  
  779. let tracerX = 0, tracerY = 0, tracermX = 0, tracermY = 0
  780.  
  781. const { fillRect } = CanvasRenderingContext2D.prototype;
  782. CanvasRenderingContext2D.prototype.fillRect = function (x, y, width, height) {
  783. let cp = (tracerX > 0 && tracerY > 0 && tracermX > 0 && tracermY > 0)
  784. if (!dlod || Date.now() - dlod >= 10) {
  785. dlo++
  786. dlod = Date.now()
  787. }
  788. if (this.fillStyle === "#a4cc4f") {
  789. tracermX = x + 50
  790. tracermY = y - 70
  791. fillRect.call(this, x, y, width, height);
  792. } else if (this.fillStyle === "#cc5151") {
  793. tracerX = x + 50
  794. tracerY = y - 70
  795. fillRect.call(this, x, y, width, height);
  796. }
  797. if (user.alive && cp && Toggle.tracers) {
  798. tracer(tracerX, tracerY, tracermX, tracermY, "#cc5151")
  799. }
  800. fillRect.call(this, x, y, width, height);
  801. return fillRect.apply(this, arguments);
  802. }
  803.  
  804. const { fillText } = CanvasRenderingContext2D.prototype;
  805. CanvasRenderingContext2D.prototype.fillText = function (text, x, y) {
  806. if (text == user.name && text.length > 1 || typeof text == "string" && text.startsWith(String.fromCharCode(0))) {
  807. let hue = 0;
  808. let step = 360 / user.name.length;
  809. for (let letter of text) {
  810. this.fillStyle = `hsl(${hue}, 100%, 50%)`;
  811. fillText.call(this, letter, x, y);
  812. x += this.measureText(letter).width;
  813. hue = (hue + step) % 360;
  814. }
  815. return;
  816. }
  817. return fillText.apply(this, arguments);
  818. }
  819.  
  820. let settingMenu = `
  821. <div id="settingMenu" class="pop-box">
  822. <div class="menu-title">
  823. <div class="pop-title text-shadowed-4">Settings</div>
  824. <div class="pop-close-button">
  825. <img id="setting-menu-close-button" class="pop-close" draggable="false" src="https://images-ext-2.discordapp.net/external/mgjNglv928NY9v8XuIr2Z2mFbQHliKADNMZn9XsDibA/https/sploop.io/img/ui/close.png">
  826. </div>
  827. </div>
  828. <div class="navbar">
  829. <div class="nb-btn text-shadowed-3" id="hack" style="margin-right: 10px;">Hack</div>
  830. <div class="nb-btn text-shadowed-3" id="control">Control</div>
  831. </div>
  832. <div class="select pop-list-content scrollbar text-shadowed-3 content subcontent-bg" id="hat_menu_content" data-menu="1"></div>
  833. <div class="select pop-list-content scrollbar text-shadowed-3 content subcontent-bg" id="hat_menu_content" data-menu="2" style="display: none;">
  834. <div class="control-box">
  835. <p style="font-size: 20px;font-weight: bold;color: white;">HealSpeed</p>
  836. <input id="control-key" data-speed="heal" class="input text-shadowed-3" placeholder="Enter speed..." value="100">
  837. </div>
  838. <div class="control-box">
  839. <p style="font-size: 20px;font-weight: bold;color: white;">AddHealMS</p>
  840. <input id="control-key" data-speed="addms" class="input text-shadowed-3" placeholder="Enter speed..." value="0">
  841. </div>
  842. <div class="control-box">
  843. <p style="font-size: 20px;font-weight: bold;color: white;">InstaKill</p>
  844. <input id="control-key" data-key="instakill" onKeyPress=SupressInput(event); class="input text-shadowed-3" placeholder="Enter key..." value="KeyR">
  845. </div>
  846. <div class="control-box">
  847. <p style="font-size: 20px;font-weight: bold;color: white;">CrystalGear</p>
  848. <input id="control-key" data-key="crystalgear" onKeyPress=SupressInput(event); class="input text-shadowed-3" placeholder="Enter key..." value="KeyT">
  849. </div>
  850. <div class="control-box">
  851. <p style="font-size: 20px;font-weight: bold;color: white;">BerserkerGear</p>
  852. <input id="control-key" data-key="berserkergear" onKeyPress=SupressInput(event); class="input text-shadowed-3" placeholder="Enter key..." value="KeyC">
  853. </div>
  854. <div class="control-box">
  855. <p style="font-size: 20px;font-weight: bold;color: white;">SpikeGear</p>
  856. <input id="control-key" data-key="spikegear" onKeyPress=SupressInput(event); class="input text-shadowed-3" placeholder="Enter key..." value="KeyG">
  857. </div>
  858. <div class="control-box">
  859. <p style="font-size: 20px;font-weight: bold;color: white;">Demolist</p>
  860. <input id="control-key" data-key="Demolist" onKeyPress=SupressInput(event); class="input text-shadowed-3" placeholder="Enter key..." value="KeyG">
  861. </div>
  862. <div class="control-box">
  863. <p style="font-size: 20px;font-weight: bold;color: white;">BoostHat</p>
  864. <input id="control-key" data-key="boosthat" onKeyPress=SupressInput(event); class="input text-shadowed-3" placeholder="Enter key..." value="KeyB">
  865. </div>
  866. </div>
  867. </div>
  868. <style>
  869. .control-box {
  870. padding: 10px;
  871. display: flex;
  872. justify-content: space-between;
  873. width: 100%;
  874. align-items: center;
  875. }
  876. #control-key {
  877. width: 180px;
  878. text-align: left;
  879. text-indent: 16px;
  880. color: white;
  881. line-height: 70px;
  882. height: 40px;
  883. font-weight: 600;
  884. }
  885. .navbar {
  886. display: flex;
  887. }
  888. .nb-btn {
  889. margin-top: 5px;
  890. width: 150px;
  891. height: 40px;
  892. display: flex;
  893. align-items: center;
  894. justify-content: center;
  895. box-shadow: inset 0 -3px 0 #333;
  896. border-radius: 7px;
  897. background-color: rgb(40 45 34 / 60%);
  898. border: 4px solid #141414;
  899. cursor: url(img/ui/cursor-pointer.png) 6 0, pointer;
  900. }
  901. #hat_menu_content {
  902. padding: 8px 0 0 0;
  903. margin-bottom: 0px;
  904. margin-top: 2.5px;
  905. }
  906. .togglerButton {
  907. margin-left: auto;
  908. outline: none;
  909. border: 4px solid #141414;
  910. padding: 7px;
  911. font-size: 16px;
  912. margin-right: 5px;
  913. cursor: url(https://sploop.io/img/ui/cursor-pointer.png) 6 0, pointer;
  914. margin-top: auto;
  915. margin-bottom: auto;
  916. color: #fff;
  917. border-radius: 10px;
  918. background-color: #96b943;
  919. box-shadow: inset 0 -5px 0 #809836;
  920. }
  921. .togglerButton:hover {
  922. background-color: #b5de53;
  923. box-shadow: inset 0 -5px 0 #95af44;
  924. }
  925. .name-desc {
  926. display: flex;
  927. flex-direction: column;
  928. padding-left: 10px;
  929. margin-bottom: 5px;
  930. }
  931. .item-container {
  932. width: 100%;
  933. display: flex;
  934. align-items: center;
  935. border-bottom: 3px solid #141414;
  936. flex-direction: row;
  937. justify-content: space-between;
  938. padding-bottom: 5px;
  939. }
  940. .menu-title {
  941. width: 100%;
  942. display: flex;
  943. justify-content: space-between;
  944. align-items: center;
  945. }
  946. #settingMenu {
  947. position: absolute;
  948. top: 80%;
  949. left: 80%;
  950. transform: translate(-50%, -50%);
  951. height: 367px;
  952. width: 500px;
  953. display: none;
  954. opacity: 1;
  955. background: rgba(40, 45, 34, 0.6);
  956. color: #fff;
  957. }
  958. </style>
  959. <script>
  960. function SupressInput($event) {
  961. $event.preventDefault();
  962. }
  963. </script>
  964. `
  965.  
  966. const __TOGGLERS__ = [{
  967. name: "AutoHeal",
  968. desc: "Auto heals you",
  969. id: "autoheal",
  970. active: true,
  971. last: false
  972. }, {
  973. name: "Optimized Heal",
  974. desc: "Optimizes autoheal in some cases",
  975. id: "optheal",
  976. active: false,
  977. last: false
  978. }, {
  979. name: "AutoPush",
  980. desc: "Automatically pushes enemies into spikes",
  981. id: "autopush",
  982. active: true,
  983. last: false
  984. }, {
  985. name: "AutoPlace",
  986. desc: "Optimizes and automates spike and trap placement",
  987. id: "autoplace",
  988. active: true,
  989. last: false
  990. }, {
  991. name: "AutoSync",
  992. desc: "Optimized attacking & Auto hat switching",
  993. id: "autosync",
  994. active: true,
  995. last: false
  996. }, {
  997. name: "AutoBreak",
  998. desc: "Automatically breaks out of traps",
  999. id: "autobreak",
  1000. active: true,
  1001. last: false
  1002. }, {
  1003. name: "AutoRespawn",
  1004. desc: "Auto respawn you",
  1005. id: "autorespawn",
  1006. active: false,
  1007. last: false
  1008. }, {
  1009. name: "UI",
  1010. desc: "visibility of the UI",
  1011. id: "ui",
  1012. active: true,
  1013. last: false
  1014. }, {
  1015. name: "AutoChat",
  1016. desc: "Sing cool song",
  1017. id: "autochat",
  1018. active: false,
  1019. last: false
  1020. }, {
  1021. name: "Tracers",
  1022. desc: "Draw tracers to enemies",
  1023. id: "tracers",
  1024. active: true,
  1025. last: false
  1026. }, {
  1027. name: "AntiAFK",
  1028. desc: "move every 5 seconds",
  1029. id: "antiAFK",
  1030. active: false,
  1031. last: true
  1032. }]
  1033.  
  1034. function __TOGGLER__(name, desc, id, active, last) {
  1035. return `
  1036. <div class="item-container" style="margin-top: 4px; ${last ? "border-bottom: none;" : "border-bottom: 3px solid #141414;"}">
  1037. <div class="name-desc">
  1038. <p style="font-size: 16px;font-weight: bold;color: white;">${name}</p>
  1039. <p style="font-size: 14px; color: #d2c396;">${desc}</p>
  1040. </div>
  1041. <button class="togglerButton text-shadowed-3" id="${id}" style="${active ? "outline: none;" : "background: #b94343; box-shadow: inset 0 -5px 0 #983636"}">
  1042. ${active ? "Enabled" : "Disabled"}
  1043. </button>
  1044. </div>
  1045. `
  1046. }
  1047.  
  1048. function genTogglers() {
  1049. __TOGGLERS__.forEach(t => {
  1050. $('[data-menu="1"]').append(__TOGGLER__(t.name, t.desc, t.id, t.active, t.last))
  1051. })
  1052. }
  1053.  
  1054. function addNotifications(text, color = "#fff") {
  1055. let idGen = () => "notification-" + ~~(Math.random() * 10000) + 1,
  1056. readyId = idGen()
  1057. let add = `
  1058. <div class="box text-shadowed-3" id="${readyId}" style="display: block; opacity: 0;">
  1059. <span style="color: ${color};">
  1060. ${text}
  1061. </span>
  1062. </div>
  1063. `
  1064. $(".notifications-holder").prepend(add)
  1065. $("#" + readyId).show().animate({ opacity: 1 }, 750)
  1066. setTimeout(() => {
  1067. $("#" + readyId).animate({ opacity: 0 }, 750, () => {
  1068. $("#" + readyId).remove()
  1069. });
  1070. }, 3000)
  1071. }
  1072.  
  1073. window.rContextMenu = () => {
  1074. let elm = document.getElementsByTagName('*')
  1075. for (let i = 0; i < elm.length; ++i) {
  1076. elm[i].oncontextmenu = null
  1077. }
  1078. }
  1079.  
  1080. function cEl(e, t, n, g) {
  1081. addNotifications(`${n} <span style='color: ${t ? "#8ecc51" : "#cc5151"}'>${t ? "enabled" : "disabled"}</span>`)
  1082. $(e).css("background", !t ? "#b94343" : "#96b943")
  1083. $(e).css("box-shadow", !t ? "inset 0 -5px 0 #983636" : "inset 0 -5px 0 #809836")
  1084. $(e).text(!t ? "Disabled" : "Enabled")
  1085. $(e).hover(() => {
  1086. $(e).css("background", !t ? "#de5353" : "#b5de53")
  1087. $(e).css("box-shadow", !t ? "inset 0 -5px 0 #af4444" : "inset 0 -5px 0 #95af44")
  1088. }, function () {
  1089. $(e).css("background", !t ? "#b94343" : "#96b943")
  1090. $(e).css("box-shadow", !t ? "inset 0 -5px 0 #983636" : "inset 0 -5px 0 #809836")
  1091. })
  1092. }
  1093.  
  1094. /* ChangeLog menu */
  1095. let changeLogMenu = `
  1096. <div class="centerMenu">
  1097. <div class="pop-box popup-fade-in" id="script-changelog" style="display: flex;">
  1098. <div class="pop-top">
  1099. <div class="pop-title text-shadowed-4" style="display: flex;align-items: center;">
  1100. <a class="pointer" style="margin-right: 5px;" href="https://discord.gg/EETcmmFgAt" target="_blank"><img class="pointer" draggable="false" src="img/ui/discord.png"></a>
  1101. SploMod - The best hack of 2024
  1102. </div>
  1103. <div class="pop-close-button"><img class="pop-close" id="close-script-cl" draggable="false" src="img/ui/close.png"></div>
  1104. </div>
  1105. <div class="pop-list-content scrollbar text-shadowed-3" id="changeLog-s"></div>
  1106. </div>
  1107. </div>
  1108. <style>
  1109. .centerMenu {
  1110. position: absolute;
  1111. top: 0;
  1112. display: flex;
  1113. justify-content: center;
  1114. align-items: center;
  1115. width: 100%;
  1116. height: 100%;
  1117. background: rgb(39 66 35 / 60%);
  1118. z-index: 100;
  1119. transform-origin: center;
  1120. }
  1121. #script-changelog {
  1122. width: 615px;
  1123. height: 475px;
  1124. }
  1125. </style>
  1126. `
  1127.  
  1128. let __CHANGELOGS__ = [
  1129. {
  1130. version: "FINAL",
  1131. date: "2024-8-26",
  1132. added: true,
  1133. remove: false,
  1134. fixed: true,
  1135. addedContent: ["Reduced the packet limit to prevent yourself getting kicked"],
  1136. removedContent: [],
  1137. fixedContent: [
  1138. "This script was patched like one year's ago, It got fixed by Ilyax and Ilyax made her own fans for splomod playable again."
  1139. ]
  1140. },
  1141. {
  1142. version: "3.2.2",
  1143. date: "2022-3-27",
  1144. added: false,
  1145. remove: false,
  1146. fixed: true,
  1147. addedContent: [],
  1148. removedContent: [],
  1149. fixedContent: [
  1150. "click the discord icon in this menu to get to our discord."
  1151. ]
  1152. },
  1153. {
  1154. version: "3.2.1",
  1155. date: "2022-3-20",
  1156. added: false,
  1157. remove: false,
  1158. fixed: true,
  1159. addedContent: [],
  1160. removedContent: [],
  1161. fixedContent: [
  1162. "fixed tracers, they are now clean and have a better design.",
  1163. "join our discord server! (click the discord icon)"
  1164. ]
  1165. },
  1166. {
  1167. version: "3.2",
  1168. date: "2022-3-20",
  1169. added: true,
  1170. remove: false,
  1171. fixed: true,
  1172. addedContent: [
  1173. "AntiAFK - moves every 5 seconds",
  1174. "Tracers - draw lines to enemies"
  1175. ],
  1176. removedContent: [],
  1177. fixedContent: [
  1178. "Fixed UI toggle not working.",
  1179. "improved optimized heal",
  1180. "join our discord server! (click the discord icon)"
  1181. ]
  1182. },
  1183. {
  1184. version: "3.1.1",
  1185. date: "2022-3-19",
  1186. added: true,
  1187. remove: false,
  1188. fixed: true,
  1189. addedContent: [
  1190. "Added autochat",
  1191. ],
  1192. removedContent: [
  1193. "nothing"
  1194. ],
  1195. fixedContent: [
  1196. "join our discord server! (click the discord icon)"
  1197. ]
  1198. },
  1199. {
  1200. version: "3.1",
  1201. date: "2022-3-19",
  1202. added: true,
  1203. remove: true,
  1204. fixed: true,
  1205. addedContent: [
  1206. "Added changelog menu.",
  1207. ],
  1208. removedContent: [
  1209. "Removed nothing."
  1210. ],
  1211. fixedContent: [
  1212. "Fixed autoheal speed.",
  1213. "join our discord server! (click the discord icon)"
  1214. ]
  1215. }, {
  1216. version: "3",
  1217. date: "2022-3-19",
  1218. added: true,
  1219. remove: false,
  1220. fixed: false,
  1221. addedContent: [
  1222. "Added game menu.",
  1223. "Added optimized autoheal."
  1224. ],
  1225. removedContent: [
  1226. "None.",
  1227. "Nothing."
  1228. ],
  1229. fixedContent: [""]
  1230. }]
  1231.  
  1232. function __CHANGELOG__(version, date, added, remove, fixed, addedContent, removedContent, fixedContent) {
  1233. let add = "",
  1234. rem = "",
  1235. fix = ""
  1236. let at = '<li class="subcontent-subtitle">Added</li>',
  1237. rt = '<li class="subcontent-subtitle">Removed</li>',
  1238. ft = '<li class="subcontent-subtitle">Fixed</li>'
  1239. let ac = () => {
  1240. let res = ""
  1241. let al = addedContent.length
  1242. for (let i = 0; i < al; i++) {
  1243. res += `<li>- ${addedContent[i]}</li>`
  1244. }
  1245. return res
  1246. }
  1247. let rc = () => {
  1248. let res = ""
  1249. let rl = removedContent.length
  1250. for (let i = 0; i < rl; i++) {
  1251. res += `<li>- ${removedContent[i]}</li>`
  1252. }
  1253. return res
  1254. }
  1255. let fc = () => {
  1256. let res = ""
  1257. let fl = fixedContent.length
  1258. for (let i = 0; i < fl; i++) {
  1259. res += `<li>- ${fixedContent[i]}</li>`
  1260. }
  1261. return res
  1262. }
  1263. if (added) {
  1264. add = `
  1265. <ul>
  1266. ${ac()}
  1267. <br>
  1268. </ul>
  1269. `
  1270. }
  1271. if (remove) {
  1272. rem = `
  1273. <ul>
  1274. ${rc()}
  1275. <br>
  1276. </ul>
  1277. `
  1278. }
  1279. if (fixed) {
  1280. fix = `
  1281. <ul>
  1282. ${fc()}
  1283. <br>
  1284. </ul>
  1285. `
  1286. }
  1287. return `
  1288. <ul class="subcontent-bg">
  1289. <li class="subcontent-title">[${version}] - ${date}</li>
  1290. <ol>
  1291. ${added ? at + add : ""}
  1292. ${remove ? rt + rem : ""}
  1293. ${fixed ? ft + fix : ""}
  1294. </ol>
  1295. </ul>
  1296. `
  1297. }
  1298.  
  1299. function genChangeLogs() {
  1300. __CHANGELOGS__.forEach(cl => {
  1301. $("#changeLog-s").append(__CHANGELOG__(cl.version, cl.date, cl.added, cl.remove, cl.fixed, cl.addedContent, cl.removedContent, cl.fixedContent))
  1302. })
  1303. }
  1304.  
  1305. let changeLog = true
  1306.  
  1307. function controlSaver() {
  1308. let items = ["bha", "sga", "bga", "cga", "ika", 'dem']
  1309. let datas = ["boosthat", "spikegear", "berserkergear", "crystalgear", "instakill", 'Demolist']
  1310. for (let i = 0; i < datas.length; i++) {
  1311. document.querySelector(`[data-key="${datas[i]}"]`).value = localStorage.getItem(items[i]) || document.querySelector(`[data-key="${datas[i]}"]`).value
  1312. }
  1313. document.querySelector('[data-speed="heal"]').value = localStorage.getItem("heal") || document.querySelector('[data-speed="heal"]').value
  1314. document.querySelector('[data-speed="addms"]').value = localStorage.getItem("addms") || document.querySelector('[data-speed="addms"]').value
  1315. }
  1316.  
  1317. /* Add at event DOMContentLoaded so that there is no HTML substitution bug */
  1318. document.addEventListener("DOMContentLoaded", () => {
  1319. $("body").append(settingMenu)
  1320. $("body").append(changeLogMenu)
  1321. $("#close-script-cl").click(() => $(".centerMenu").css("display", "none"))
  1322. let bha = [false, document.querySelector('[data-key="boosthat"]')]
  1323. let dem = [false, document.querySelector('[data-key="Demolist"]')]
  1324. let sga = [false, document.querySelector('[data-key="spikegear"]')]
  1325. let bga = [false, document.querySelector('[data-key="berserkergear"]')]
  1326. let cga = [false, document.querySelector('[data-key="crystalgear"]')]
  1327. let ika = [false, document.querySelector('[data-key="instakill"]')]
  1328. document.querySelector('[data-speed="heal"]').oninput = (e) => (e.target.value = e.target.value.replace(/\D/g, ''), localStorage.setItem("heal", document.querySelector('[data-speed="heal"]').value))
  1329. document.querySelector('[data-speed="addms"]').oninput = (e) => (e.target.value = e.target.value.replace(/\D/g, ''), localStorage.setItem("addms", document.querySelector('[data-speed="addms"]').value))
  1330. bha[1].onclick = () => (bha[1].value = "...", bha[0] = true)
  1331. dem[1].onclick = () => (dem[1].value = "...", dem[0] = true)
  1332. sga[1].onclick = () => (sga[1].value = "...", sga[0] = true)
  1333. bga[1].onclick = () => (bga[1].value = "...", bga[0] = true)
  1334. cga[1].onclick = () => (cga[1].value = "...", cga[0] = true)
  1335. ika[1].onclick = () => (ika[1].value = "...", ika[0] = true)
  1336. document.addEventListener("keydown", e => {
  1337. if (bha[0]) (bha[0] = false, bha[1].value = e.code, localStorage.setItem("bha", e.code))
  1338. if (dem[0]) (dem[0] = false, dem[1].value = e.code, localStorage.setItem("dem", e.code))
  1339. if (sga[0]) (sga[0] = false, sga[1].value = e.code, localStorage.setItem("sga", e.code))
  1340. if (bga[0]) (bga[0] = false, bga[1].value = e.code, localStorage.setItem("bga", e.code))
  1341. if (cga[0]) (cga[0] = false, cga[1].value = e.code, localStorage.setItem("cga", e.code))
  1342. if (ika[0]) (ika[0] = false, ika[1].value = e.code, localStorage.setItem("ika", e.code))
  1343. })
  1344. genChangeLogs()
  1345. controlSaver()
  1346. if (changeLog) {
  1347. $(".centerMenu").css("display", "flex")
  1348. changeLog = false
  1349. }
  1350. genTogglers()
  1351. $("#autoheal").click(() => (Toggle.autoHeal = !Toggle.autoHeal, cEl("#autoheal", Toggle.autoHeal, "AutoHeal")))
  1352. $("#autopush").click(() => (Toggle.autoPush = !Toggle.autoPush, cEl("#autopush", Toggle.autoPush, "AutoPush")))
  1353. $("#autosync").click(() => (Toggle.autoSync = !Toggle.autoSync, cEl("#autosync", Toggle.autoSync, "AutoSync")))
  1354. $("#autoplace").click(() => (Toggle.autoPlace = !Toggle.autoPlace, cEl("#autoplace", Toggle.autoPlace, "AutoPlace")))
  1355. $("#autobreak").click(() => (Toggle.autoBreak = !Toggle.autoBreak, cEl("#autobreak", Toggle.autoBreak, "AutoBreak")))
  1356. $("#autochat").click(() => (log(Toggle.autoChat), Toggle.autoChat = !Toggle.autoChat, cEl("#autochat", Toggle.autoChat, "AutoChat")))
  1357. $("#tracers").click(() => (Toggle.tracers = !Toggle.tracers, cEl("#tracers", Toggle.tracers, "Tracers")))
  1358. $("#autorespawn").click(() => (Toggle.autoRespawn = !Toggle.autoRespawn, cEl("#autorespawn", Toggle.autoRespawn, "AutoRespawn")))
  1359. $("#optheal").click(() => (Toggle.optHeal = !Toggle.optHeal, cEl("#optheal", Toggle.optHeal, "OptimizedAutoheal")))
  1360. $("#ui").click(() => (Toggle.UI = !Toggle.UI, cEl("#ui", Toggle.UI, "UI")))
  1361. $("#antiAFK").click(() => (Toggle.antiAFK = !Toggle.antiAFK, cEl("#antiAFK", Toggle.antiAFK, "antiAFK")))
  1362. $("#setting-menu-close-button").click(() => {
  1363. $("#settingMenu").css("display", "none")
  1364. })
  1365. $("#hack").click(() => {
  1366. $('[data-menu="1"]').css("display", "block")
  1367. $('[data-menu="2"]').css("display", "none")
  1368. })
  1369. $("#control").click(() => {
  1370. $('[data-menu="1"]').css("display", "none")
  1371. $('[data-menu="2"]').css("display", "block")
  1372. })
  1373. document.addEventListener("keydown", e => {
  1374. if (e.code == "Escape") {
  1375. if ($("#settingMenu").css("display") == "flex") {
  1376. $("#settingMenu").css("display", "none")
  1377. } else {
  1378. $("#settingMenu").css("display", "flex")
  1379. $("#clan-menu").css("display", "none")
  1380. $("#hat-menu").css("display", "none")
  1381. }
  1382. }
  1383. })
  1384. setInterval(() => {
  1385. if ($("#clan-menu").css("display") == "block" || $("#hat-menu").css("display") == "flex") {
  1386. $("#settingMenu").css("display", "none")
  1387. }
  1388. if ($("#homepage").css("display") == "flex") {
  1389. $("#settingMenu").css("display", "none")
  1390. }
  1391. }, 500)
  1392. })
  1393.  
  1394.  
  1395.  
  1396.