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

open menu key P

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