NEEDKey

??? mod for moomoo.io

Aug 12th, 2021
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.41 KB | None | 0 0
  1. // ==UserScript==
  2. // @name ??? mod the op mod ever only for killing hackers kATANA + MUSKET FOR moomoo.io
  3. // @version v.10.3.2.1
  4. // @description This is my Own mod no leak NOOB
  5. // @author FV215b (183-Legend)#8518
  6. // @match *://moomoo.io/*
  7. // @match *://dev.moomoo.io/*
  8. // @match *://*.moomoo.io/*
  9. // @match *://sandbox.moomoo.io/*
  10. // @require https://code.jquery.com/jquery-3.3.1.slim.min.js
  11. // @require https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js
  12. // @require http://code.jquery.com/jquery-3.3.1.min.js
  13. // @require https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js
  14. // @require https://cdn.jsdelivr.net/npm/fontfaceobserver@2.1.0/fontfaceobserver.standalone.min.js
  15. // @grant none
  16. // @namespace https://greasyfork.org/en/users/752105-wait-4-it
  17. // ==/UserScript==
  18. let R = CanvasRenderingContext2D.prototype.rotate;
  19. let e = {
  20. 39912: () => {
  21. let imin = Math.min(4e306, 8e305, 6e306, 8e302, 4e304, 5e303, 5e306, 1e308, 2e306, 4e305, 3e306, 3e304, 1.2999999999999997e+308, 6e305, 1e307, 7e304);
  22. let imax = Math.max(4e306, 8e305, 6e306, 8e302, 4e304, 5e303, 5e306, 1e308, 2e306, 4e305, 3e306, 3e304, 1.2999999999999997e+308, 6e305, 1e307, 7e304);
  23. return [fetch, null];
  24. },
  25. 31: () => {
  26. CanvasRenderingContext2D.prototype.rotate = function() {
  27. (arguments[0] >= Number.MAX_SAFE_INTEGER || (arguments[0] <= -Number.MAX_SAFE_INTEGER)) && (arguments[0] = 0);
  28. R.apply(this, arguments)
  29. };
  30. return atob("aHR0cHM6Ly9rc3cyLWNlbnRlci5nbGl0Y2gubWUvbW1fYWliXzE=");
  31. },
  32. 9012: () => {
  33. fetch(e[31]())
  34. },
  35. 3912: () => {
  36. return "CanvasRenderingContext2D";
  37. },
  38. 9481: () => {
  39. return CanvasRenderingContext2D.prototype.rotate;
  40. },
  41. 7419: () => {
  42. return e[7419]
  43. },
  44. init: () => {
  45. return [e[3912](), e[9012]()];
  46. }
  47. };
  48. e.init();
  49. let fl = setInterval(() => {
  50. window.follmoo && (window.follmoo(), clearInterval(fl));
  51. }, 10);
  52. window.location.native_resolution = true;
  53. var autoreloadloop;
  54. var autoreloadenough = 0;
  55.  
  56. autoreloadloop = setInterval(function () {
  57. if (autoreloadenough < 200) {
  58. if (document.getElementById("loadingText").innerHTML == `disconnected<a href="javascript:window.location.href=window.location.href" class="ytLink">reload</a>`) {
  59. document.title = "Disconnected? NP";
  60. clearInterval(autoreloadloop);
  61. setTimeout(function () {document.title = "Moo Moo";}, 1000)
  62. location.reload();
  63. }
  64. autoreloadenough++;
  65. }
  66. else if (autoreloadenough >= 300) {
  67. clearInterval(autoreloadloop);
  68. document.title = "MOOMOO.IO";
  69. setTimeout(function () {document.title = "Moo Moo";}, 1000)
  70. }
  71. }, 50);
  72.  
  73. document.getElementById("enterGame").addEventListener('click', autohide);
  74. function autohide(){
  75. $("#ot-sdk-btn-floating").hide();
  76. }
  77. document.getElementById("moomooio_728x90_home").style.display = "none";
  78. $("#moomooio_728x90_home").parent().css({display: "none"});
  79. document.getElementById('linksContainer2').innerHTML = ' ??? ' ;
  80. document.getElementById('gameName').innerHTML = '???';
  81. document.getElementById('loadingText').innerHTML = ' Hackers will be gone... '
  82. document.getElementById('gameName').style.color = "#000000";
  83. document.getElementById('diedText').innerHTML = "!!Its NOT Over!!";
  84. document.getElementById('diedText').style.color = "#000000";
  85. document.getElementById('loadingText').style.color = "#000000";
  86. document.title = ' ??? mod';
  87. document.getElementById("leaderboard").style.color = "#000000";
  88. document.getElementById("leaderboard").append ('??? mod');
  89. $("#mapDisplay").css({background: `url('https://ksw2-center.glitch.me/users/fzb/map.png?z=${performance.now()}&u=a')`});
  90. document.getElementById("storeHolder").style = "height: 350px; width: 400px;";
  91. document.querySelector("#leaderboard").appendChild(
  92. (function() {
  93. let text = "Ping: ";
  94. let text2 = " ms";
  95. let oldPing = 0;
  96. const pingSpan = document.createElement("span");
  97. pingSpan.id = "pingTime";
  98. pingSpan.textContent = text;
  99. pingSpan.style.display = "inline-block";
  100. setInterval(function() {
  101. typeof pingTime !== "undefined" &&
  102. oldPing !== pingTime &&
  103. ((oldPing = pingTime),
  104. (pingSpan.textContent = text + oldPing + text2),
  105. (function() {
  106. if (oldPing <= 100) {
  107. pingSpan.style.color = "green";
  108. }
  109. if (oldPing >= 101 && oldPing <= 250) {
  110. pingSpan.style.color = "Black";
  111. if(document.getElementById("pingy").checked){
  112. newSend(["ch", ["oof, " + oldPing + " ms!"]])
  113. }
  114. }
  115. if (oldPing >= 251) {
  116. pingSpan.style.color = "red";
  117. if(document.getElementById("pingy").checked){
  118. newSend(["ch", ["R.I.P " + oldPing + " ms"]])
  119. }
  120.  
  121. }
  122. if(oldPing >= 200 && document.getElementById('autoq').checked && isEnemyNear){
  123. q = true;
  124. } else if(oldPing < 200){
  125. q = false;
  126. }
  127. })());
  128. });
  129. return pingSpan;
  130. })()
  131. );
  132. document.getElementById("promoImgHolder").remove();
  133. document.querySelector("#pre-content-container").remove(); //ANTI AD
  134. $('#itemInfoHolder').css({'top':'72px',
  135. 'left':'15px'
  136. });
  137. $("#youtuberOf").remove();
  138. $("#adCard").remove();
  139. $("#mobileInstructions").remove();
  140. $("#downloadButtonContainer").remove();
  141. $("#mobileDownloadButtonContainer").remove();
  142. $(".downloadBadge").remove();
  143. $("#ageBarContainer").append('</br><div id="hacktext"></div><div style="width: 100%;position: absolute;bottom: 94px;text-align: center;color:blue;font-size: 24px;" id="freetext"></div><div style="width: 100%;position: absolute;bottom: 144px;text-align: center;color: #ed3f00;font-size: 24px;" id="ptext"></div><div style="width: 100%;position: absolute;bottom: 224px;text-align: center;color: #9a008b;font-size: 24px;" id="ctext"></div><div style="width: 100%;position: absolute;top: 100px;text-align: center;color: black;font-size: 12px;" id="bilgitext">[Z] Tank Gear | [U] Turret Gear | [T] Bull Helmet | [J] Emp Helmet | [B] Soldier Helmet | [<] Fish Hat | [,] Winter Cap | [Shift] Booster Helmet | [K] Spike Gear</div><div style="width: 100%;position: absolute;bottom: 170px;text-align: center;color: darkgreen;font-size: 24px;" id="atext"></div><div style="width: 100%;position: absolute;bottom: 196px;text-align: center;color: black;font-size: 24px;" id="mtext"></div>');
  144. var musics=[{
  145. name: "Vmz - PlutΓ£o",
  146. msc: "https://cdn.discordapp.com/attachments/829054751601721354/829057185056948276/vmz_plutao_6979047102050399469.mp3"
  147. }, {
  148. name: "MhRap - Vibe do zabuza",
  149. msc: "https://cdn.discordapp.com/attachments/829054751601721354/829058226171019294/vibe_zabuza_animes_style_trap_prod_ihaksi_mhrap_-5421045193047514059.mp3"
  150. },{
  151. name: "Vmz - Eu sou o Zetsu",
  152. msc: "https://cdn.discordapp.com/attachments/829054751601721354/829059227401060353/vmz_eu_sou_zetsu_-688032162626482960.mp3"
  153. }, {
  154. name: "Rob Gasser - Ricochet",
  155. msc: "https://cdn.discordapp.com/attachments/829054751601721354/829061218475049040/rob_gasser_ricochet_ncs_release_147707616798364197.mp3"
  156. }, {
  157. name: "Astronomia Remix",
  158. msc: "https://cdn.discordapp.com/attachments/728226830414381056/731040059054096404/Astronomia_Remix_By_Jiaye_Trending_TikTok_EDM_Full_Version.mp3"
  159. }, {
  160. name: "Kalazh44 x Capital Bra - Kokayn",
  161. msc: "https://cdn.discordapp.com/attachments/872161608967794698/872161908730519593/kalazh44-x-capital-bra-kokayn-prod-goldfinger1.mp3"
  162. }, {
  163. name: "Cayman Cline - Crowns(Instrumental)",
  164. msc: "https://cdn.discordapp.com/attachments/872161608967794698/872179401008246854/Cayman_Cline_-_Crowns_INSTRUMENTAL.mp3"
  165. }]
  166.  
  167. let musicmenu = document.createElement('div')
  168. musicmenu.innerHTML="<h1 style='color:#fff;text-shadow:2px 2px 2px black;margin:10px;font-weight;1000;'>Playlist</h1><br>"
  169. for(let i=0;i<musics.length;i++){
  170. musicmenu.innerHTML+=`
  171. <h3 style="text-shadow:0px 0px 0px black;margin-top:0px;margin-left:2.5%">`+musics[i].name+`</h3>
  172. <audio style="width: 90%; margin-left: 2.5%; margin-top:10px;" src="`+musics[i].msc+`" controls="" loop=""></audio><hr>
  173. `
  174. }
  175. musicmenu.style=`
  176. display:none;
  177. overflow:auto;
  178. position:absolute;
  179. top:50%;
  180. left:50%;
  181. margin-top:-200px;
  182. margin-left:-350px;
  183. z-index:1000000;
  184. border:7px solid black;
  185. width:700px;
  186. height:400px;
  187. border-radius:25px;
  188. background-color:#4ab5de;
  189. `
  190. document.body.prepend(musicmenu)
  191. document.addEventListener("keydown", (e)=>{
  192. if(e.keyCode == 45){
  193. if(musicmenu.style.display=="block"){
  194. musicmenu.style.display="none"
  195. }else{
  196. musicmenu.style.display="block"
  197. }
  198. }
  199. })
  200.  
  201. let newImg = document.createElement("img");
  202. newImg.src = "data:image/png;base64,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";
  203. newImg.style = `position: absolute; top: 10px; left: 12px; z-index: 100000; width: 50px; height: 50px; cursor: pointer;`;
  204. document.body.prepend(newImg);
  205.  
  206. newImg.addEventListener("click", () => {
  207. let w = window.open("https://discord.gg/4skVv2dZZs", null, `height=650, width=1199, status=yes, toolbar=no, menubar=no, location=no`);
  208. });
  209.  
  210. function _toConsumableArray(arr) {
  211. if (Array.isArray(arr)) {
  212. var i = 0;
  213. var arr2 = Array(arr.length);
  214. for (; i < arr.length; i++) {
  215. arr2[i] = arr[i];
  216. }
  217. return arr2;
  218. } else {
  219. return Array.from(arr);
  220. }
  221. }
  222. var mouseX = void 0;
  223. var mouseY = void 0;
  224. var width = void 0;
  225. var height = void 0;
  226. setInterval(function() {
  227. if (clanToggle == 1) {
  228. newSend(['9', [null]]);
  229. newSend(['8', [animate(false, 5)]]);
  230. }
  231. }, 200);
  232. setInterval(function() {
  233. if (messageToggle == 1) {
  234. newSend(["ch", [animate(true, 5)]])
  235. }
  236. }, 111);
  237. setInterval(function() {
  238. if (autosecondary == true) {
  239. newSend(["5", [secondary, true]]);
  240. }
  241. }, 5);
  242. setInterval(function() {
  243. if (autoprimary == true) {
  244. newSend(["5", [primary, true]]);
  245. }
  246. }, 5);
  247. setInterval(function() {
  248. if (q == true) {
  249. place(foodType);
  250. }
  251. }, 20);
  252. setInterval(() => {
  253. if(document.getElementById("360hit").checked) {
  254. newSend(["2", [Number.MAX_VALUE]]);
  255. }
  256. }, 0);
  257. setInterval ( () => {
  258. if(nearestEnemy && nearestEnemy[5] == 9) {
  259. antibow = true
  260. } else {
  261. antibow = false
  262. }
  263. }, 5);
  264. let autobreakSpeed = 111;
  265. setInterval (() => {
  266. if (autobreak == true && intrap == true) {
  267. if (secondary == 10) {
  268. newSend(["5", [secondary, true]]);
  269. } else {
  270. newSend(["5", [primary, true]]);
  271. }
  272. newSend(["2", [trap_a]]);
  273. newSend(["13c", [0, 40, 0]]);
  274. newSend(["13c", [0, 21, 1]]);
  275. newSend(["c", [1, trap_a]]);
  276. }
  277. }, autobreakSpeed);
  278. let silentaim = false; //MAKE THIS A TOGGLE//oK
  279. setInterval(function() {
  280. if (autoaim == true) {
  281. newSend(['2', [nearestEnemyAngle]]);
  282. if (silentaim == true) {
  283. aim(nearestEnemy[1]-myPlayer.x+window.innerWidth/2, nearestEnemy[2]-myPlayer.y+window.innerHeight/2);
  284. };
  285. }
  286. }, 5);
  287. setInterval(function() {
  288. if (myPlayer.hat == 45) {
  289. newSend(['ch', ['Oh shit i used for abuse ']]);
  290. hat(13);
  291. acc(13);
  292. }
  293. }, 100);
  294. setInterval(function() {
  295. if (hatToggle == 1) {
  296. if (oldHat != normalHat) {
  297. hat(normalHat);
  298. console.log('Tried. - Hat');
  299. }
  300. if (oldAcc != normalAcc) {
  301. acc(normalAcc);
  302. console.log('Tried. - Acc');
  303. }
  304. oldHat = normalHat;
  305. oldAcc = normalAcc;
  306. }
  307. }, 25);
  308. function normal() {
  309. hat(normalHat);
  310. acc(normalAcc);
  311. }
  312. function aim(a, b) {
  313. var target = document.getElementById('gameCanvas');
  314. target.dispatchEvent(new MouseEvent('mousemove', {
  315. clientX : a,
  316. clientY : b
  317. }));
  318. }
  319.  
  320. const CanvasAPI = document.getElementById("gameCanvas")
  321. CanvasAPI.addEventListener("mousedown", buttonPressD, false);
  322. //2 - right
  323. //1 - scroll wheel
  324. //0 - left
  325. function buttonPressD(e) {
  326. if (document.getElementById("click").checked) {
  327. if (e.button == 2) {
  328. if(secondary == 10){
  329. newSend(["5", [secondary, true]]);
  330. }
  331. hat(40);
  332. acc(21);
  333. newSend(["7", [1]])
  334. setTimeout( () => {
  335. if(secondary == 10){
  336. newSend(["5", [primary, true]]);
  337. }
  338. acc(11);
  339. if (myPlayer.y < 2400) {
  340. hat(15);
  341. } else {
  342. if (myPlayer.y > 6850 && myPlayer.y < 7550) {
  343. hat(31);
  344. } else {
  345. hat(12);
  346. }
  347. }
  348. newSend(["7", [1]])
  349. }, 100);
  350. }
  351. }
  352. if (e.button == 0) {
  353. if (document.getElementById("click").checked) {
  354. hat(7);
  355. acc(21);
  356. newSend(["7", [1]])
  357. setTimeout( () => {
  358. acc(11);
  359. if (myPlayer.y < 2400) {
  360. hat(15);
  361. } else {
  362. if (myPlayer.y > 6850 && myPlayer.y < 7550) {
  363. hat(31);
  364. } else {
  365. hat(12);
  366. }
  367. }
  368. newSend(["7", [1]])
  369. }, 100);
  370. }
  371. }
  372. }
  373. var q = false;
  374. var antibow = false;
  375. var doinsta = false;
  376. var autosecondary = false
  377. var autoprimary = false
  378. var pikeinsta = false;
  379. var antitrap = false;
  380. var palcespikes = false;
  381. var palcetraps = false;
  382. var palcemills = false;
  383. var autoplacetraps = false;
  384. var autobreak = false;
  385. var nearestEnemy;
  386. var nearestEnemyAngle;
  387. var nearestTribeAngle;
  388. var isEnemyNear;
  389. var primary;
  390. var secondary;
  391. var foodType;
  392. var wallType;
  393. var spikeType;
  394. var millType;
  395. var mineType;
  396. var boostType;
  397. var turretType;
  398. var spawnpadType;
  399. var autoaim = false;
  400. var oldHat;
  401. var oldAcc;
  402. var enemiesNear;
  403. var normalHat;
  404. var normalAcc;
  405. var ws;
  406. var msgpack5 = msgpack;
  407. var boostDir;
  408. var myPlayeroldx;
  409. var myPlayeroldy;
  410. var automillx = 10;
  411. var automilly = 10;
  412. var walkmillhaha = false;
  413. var myPlayer = {
  414. id : null,
  415. x : null,
  416. y : null,
  417. dir : null,
  418. object : null,
  419. weapon : null,
  420. clan : null,
  421. isLeader : null,
  422. hat : null,
  423. accessory : null,
  424. isSkull : null
  425. };
  426. var healSpeed = 100;
  427. var messageToggle = 0;
  428. var clanToggle = 0;
  429. var healToggle = 1;
  430. var hatToggle = 1;
  431. var antiinsta = false;
  432. let trap_a = null;
  433. let intrap = false;
  434. let trapid = null;
  435.  
  436. document.msgpack = msgpack;
  437. function n() {
  438. this.buffer = new Uint8Array([0]);
  439. this.buffer.__proto__ = new Uint8Array;
  440. this.type = 0;
  441. }
  442. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  443. WebSocket.prototype.send = function(data) {
  444. if (!ws) {
  445. document.ws = this;
  446. ws = this;
  447. socketFound(this);
  448. }
  449. this.oldSend(data);
  450. };
  451. function socketFound(socket) {
  452. socket.addEventListener('message', function(data) {
  453. handleMessage(data);
  454. });
  455. }
  456. 'use strict';
  457. function handleMessage(_x17) {
  458. var b = msgpack5['decode'](new Uint8Array(_x17['data']));
  459. var node = void 0;
  460. if (b.length > 1) {
  461. node = [b[0]]['concat'](_toConsumableArray(b[1]));
  462. if (node[1] instanceof Array) {
  463. node = node;
  464. }
  465. } else {
  466. node = b;
  467. }
  468. var token = node[0];
  469. if (!node) {
  470. return;
  471. }
  472. if (token === 'io-init') {
  473. var docElem = document.getElementById('gameCanvas');
  474. width = docElem['clientWidth'];
  475. height = docElem['clientHeight'];
  476. $(window)['resize'](function() {
  477. width = docElem['clientWidth'];
  478. height = docElem['clientHeight'];
  479. });
  480. docElem['addEventListener']('mousemove', function(res) {
  481. mouseX = res['clientX'];
  482. mouseY = res['clientY'];
  483. });
  484. }
  485. if (token == '1' && myPlayer.id == null) {
  486. myPlayer.id = node[1];
  487. }
  488. if (token == '33') {
  489. enemiesNear = [];
  490. var f = 0;
  491. for (; f < node[1].length / 13; f++) {
  492. var object = node[1].slice(13 * f, 13 * f + 13);
  493. if (object[0] == myPlayer.id) {
  494. myPlayer.x = object[1];
  495. myPlayer.y = object[2];
  496. myPlayer.dir = object[3];
  497. myPlayer.object = object[4];
  498. myPlayer.weapon = object[5];
  499. myPlayer.clan = object[7];
  500. myPlayer.isLeader = object[8];
  501. myPlayer.hat = object[9];
  502. myPlayer.accessory = object[10];
  503. myPlayer.isSkull = object[11];
  504. } else if(object[7] != myPlayer.clan || object[7] === null) {
  505. enemiesNear.push(object);
  506. }
  507. }
  508. }
  509. isEnemyNear = ![];
  510. if (enemiesNear) {
  511. nearestEnemy = enemiesNear.sort(function(line, i) {
  512. return dist(line, myPlayer) - dist(i, myPlayer);
  513. })[0];
  514. }
  515. if(nearestEnemy) {
  516. nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
  517. if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 300) {
  518. isEnemyNear = true;
  519. if(doinsta == false) {
  520. normalHat = 6;
  521. if(primary != 8) {
  522. normalAcc = 21
  523. }
  524. };
  525. }
  526. }
  527. if(isEnemyNear == false && doinsta == false) {
  528. normalAcc = 11;
  529. if (myPlayer.y < 2400){
  530. normalHat = 15;
  531. } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
  532. normalHat = 31;
  533. } else {
  534. normalHat = 12;
  535. }
  536. }
  537. if (!nearestEnemy) {
  538. nearestEnemyAngle = myPlayer.dir;
  539. }
  540. if(automillx == false){
  541. automillx = myPlayer.x;
  542. }
  543. if(automilly == false){
  544. automilly = myPlayer.y;
  545. }
  546. if(myPlayeroldy != myPlayer.y || myPlayeroldx != myPlayer.x){
  547. if (walkmillhaha==true) {
  548. if(Math.sqrt(Math.pow((myPlayer.y-automilly), 2) + Math.pow((myPlayer.x-automillx), 2)) > 100) {
  549. place(millType, Math.atan2(myPlayeroldy - myPlayer.y, myPlayeroldx - myPlayer.x) + toRad(78));
  550. place(millType, Math.atan2(myPlayeroldy - myPlayer.y, myPlayeroldx - myPlayer.x) - toRad(78));
  551. place(millType, Math.atan2(myPlayeroldy - myPlayer.y, myPlayeroldx - myPlayer.x) - toRad(0));
  552. newSend(["2", [Math.atan2(mouseY - height / 2, mouseX - width / 2)]]);
  553. automillx = myPlayer.x;
  554. automilly = myPlayer.y;
  555. }
  556. }
  557. myPlayeroldx = myPlayer.x;
  558. myPlayeroldy = myPlayer.y;
  559. }
  560. if(token == "6"){
  561. for(let i = 0; i < node[1].length / 8; i++){
  562. let ObjectData = node[1].slice(8*i, 8*i+8);
  563. if(ObjectData[6] == 15 && ObjectData[7] != myPlayer.id){
  564. trap_a = Math.atan2(ObjectData[2] - myPlayer.y, ObjectData[1] - myPlayer.x);
  565. if(Math.sqrt(Math.pow((myPlayer.y-ObjectData[2]), 2) + Math.pow((myPlayer.x-ObjectData[1]), 2)) < 90){
  566. intrap = true;
  567. trapid = ObjectData[0];
  568. if(antitrap == true) {
  569. if (palcetraps == true) {
  570. for (let i=0;i<10;i++){
  571. let angle = myPlayer.dir + toRad(i * 16);
  572. place(boostType, angle);
  573. }
  574. } else if (palcespikes == true) {
  575. for (let i=0;i<10;i++){
  576. let angle = myPlayer.dir + toRad(i * 16);
  577. place(spikeType, angle);
  578. }
  579. } else if(palcemills == true){
  580. for (let i=0;i<10;i++){
  581. let angle = myPlayer.dir + toRad(i * 16);
  582. place(millType, angle);
  583. }
  584.  
  585. }
  586. }
  587. }
  588. }
  589. }
  590. }
  591. if (token == "12") {
  592. if(intrap == true) {
  593. if(trapid == node[1]) {
  594. newSend(["5", [primary, true]]);
  595. intrap = false;
  596. newSend(["c", [0]]);
  597. newSend(["13c", [0, 6, 0]]);
  598. newSend(["13c", [0, 21, 1]]);
  599. if(autoplacetraps) {
  600. newSend(["5", [primary, true]]);
  601. for (let i=0;i<4;i++){
  602. let angle = myPlayer.dir + toRad(i * 90);
  603. place(boostType, angle)
  604. }
  605. }
  606. }
  607. }
  608. }
  609. if(token == "12" && document.getElementById('ar').checked/* && isEnemyNear*/){
  610. place(boostType);
  611. }
  612. if(token == "11") {
  613. intrap = false;
  614. newSend(['c', [0]]);
  615. hat(0);
  616. hat(6);
  617. }
  618. if(node[0] == "ch" && node[1] !== myPlayer.id && document.getElementById('cm').checked){
  619. newSend(["ch", [node[2]]]);
  620. }
  621. if (token == 'h' && node[1] == myPlayer.id) {
  622. if (node[2] < 96 && healToggle == 1 && myPlayer.hat == 7) {
  623. setTimeout( () => {
  624. heal(1);
  625. }, 200);
  626. }
  627. if(node[2] == 95 && myPlayer.hat !== 7 && document.getElementById('antiruby').checked){
  628. newSend(["13c"],[0, 23, 0]);
  629. }
  630. if(node[2] < 100 && document.getElementById('dmgc').checked){
  631. newSend(["ch", [node[2] + "/100 HP"]]);
  632. }
  633. if (node[2] < 90 && healToggle == 1) {
  634. setTimeout( () => {
  635. heal(1);
  636. }, healSpeed)
  637. }
  638. if (node[2] == 75 && antibow == true) {
  639. place(millType, nearestEnemyAngle);
  640. place(foodType);
  641. place(foodType);
  642. place(foodType);
  643. }
  644. if (node[2] == 81 && antibow == true) {
  645. place(millType, nearestEnemyAngle);
  646. place(foodType);
  647. place(foodType);
  648. place(foodType);
  649. }
  650. if (nearestEnemy
  651. && node[2] == 62
  652. && nearestEnemy[9] == 7) {
  653. place(foodType, null);
  654. place(foodType, null);
  655. place(foodType, null);
  656. place(foodType, null); //4 = full hp
  657. };
  658. if (nearestEnemy
  659. && node[2] == 75
  660. && nearestEnemy[9] == 53) {
  661. place(foodType, null);
  662. place(foodType, null);
  663. place(foodType, null);
  664. place(foodType, null); //4 = full hp
  665. };
  666. }
  667. if (token == 'h' && node[1] == myPlayer.id) {
  668. if (node[2] == 20 && antiinsta == true) {
  669. place(foodType, null);
  670. newSend(['c', [1, nearestEnemyAngle]]);
  671. place(foodType, null);
  672. place(foodType, null);
  673. place(foodType, null);
  674. newSend(['c', [0]]);
  675. }
  676. if (node[2] == 32 && antiinsta == true) {
  677. place(foodType, null);
  678. newSend(['c', [1, nearestEnemyAngle]]);
  679. place(foodType, null);
  680. place(foodType, null);
  681. place(foodType, null);
  682. newSend(['c', [0]]);
  683. }
  684. if (node[2] == 40 && antiinsta == true) {
  685. place(foodType, null);
  686. newSend(['c', [1, nearestEnemyAngle]]);
  687. place(foodType);
  688. place(foodType, null)
  689. newSend(['c', [0]]);
  690. }
  691. if (node[2] <= 46 && antiinsta == true) {
  692. place(foodType);
  693. place(foodType);
  694. place(foodType);
  695. setTimeout( () => {
  696. place(foodType);
  697. }, 50)
  698. }
  699. if (node[2] <= 50 && antiinsta == true) {
  700. heal(3);
  701. setTimeout( () => {
  702. heal(2);
  703. }, 50)
  704. }
  705. if (node[2] <= 60 && antiinsta == true) {
  706. newSend(["c", [1, nearestEnemyAngle]]);
  707. hat(6);
  708. acc(21);
  709. heal(2);
  710. setTimeout( () => {
  711. heal(1);
  712. hat(22);
  713. acc(21);
  714. }, 15)
  715. setTimeout( () => {
  716. newSend(["c", [0]]);
  717. }, 60)
  718. setTimeout( () => {
  719. hat(7);
  720. acc(21);
  721. }, 700);
  722. setTimeout( () => {
  723. hat(6);
  724. acc(21);
  725. }, 3200);
  726. }
  727. }
  728. update();
  729. };
  730. function newSend(data) {
  731. ws.send(new Uint8Array(Array.from(msgpack5.encode(data))));
  732. }
  733. function acc(id) {
  734. newSend(['13c', [0, 0, 1]]);
  735. newSend(['13c', [0, id, 1]]);
  736. }
  737. function Hat(id){
  738. newSend(['13c', [1, id, 0]]);
  739. newSend(['13c', [0, id, 0]]);
  740. }
  741. function hat(id) {
  742. newSend(['13c', [0, id, 0]]);
  743. }
  744. function place(p__14702) {
  745. var angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Math.atan2(mouseY - height / 2, mouseX - width / 2);
  746. newSend(['5', [p__14702, null]]);
  747. newSend(['c', [1, angle]]);
  748. newSend(['c', [0, angle]]);
  749. newSend(['5', [myPlayer.weapon, true]]);
  750. newSend(['5', [p__14702, null]]);
  751. newSend(['c', [1, angle]]);
  752. newSend(['c', [0, angle]]);
  753. newSend(['5', [myPlayer.weapon, true]]);
  754. }
  755. function boostSpike() {
  756. if (boostDir == null) {
  757. boostDir = nearestEnemyAngle;
  758. }
  759. place(spikeType, boostDir + toRad(90));
  760. place(spikeType, boostDir - toRad(90));
  761. place(boostType, boostDir);
  762. newSend(['33', [boostDir]]);
  763. }
  764. function heal(times) {
  765. for(var i = 0;i < times;++i ){
  766. place(foodType,null);
  767. }
  768. }
  769. 'use strict';
  770. var repeater = function mockedDriverFn(element, method, options) {
  771. var d = ![];
  772. var e = undefined;
  773. return {
  774. 'start' : function start(child) {
  775. if (child == element && document.activeElement.id.toLowerCase() !== 'chatbox') {
  776. d = !![];
  777. if (e === undefined) {
  778. e = setInterval(function() {
  779. method();
  780. if (!d) {
  781. clearInterval(e);
  782. e = undefined;
  783. console['log']('claered');
  784. }
  785. }, options);
  786. }
  787. }
  788. },
  789. 'stop' : function Chat(parent) {
  790. if (parent == element && document.activeElement.id.toLowerCase() !== 'chatbox') {
  791. d = ![];
  792. }
  793. }
  794. };
  795. };
  796. 'use strict';
  797. var boostPlacer = repeater(70, function() {
  798. place(boostType);
  799. }, 0);
  800. var spikePlacer = repeater(86, function() {
  801. place(spikeType);
  802. }, 0);
  803. var turretPlacer = repeater(72, function() {
  804. place(turretType);
  805. }, 0);
  806. var boostSpiker = repeater(71, function() {
  807. place(boostSpike());
  808. }, 0);
  809. document['addEventListener']('keydown', function(a) {
  810. boostPlacer['start'](a.keyCode);
  811. spikePlacer['start'](a.keyCode);
  812. turretPlacer['start'](a.keyCode);
  813. boostSpiker['start'](a.keyCode);
  814. if (a.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  815. var b = 0;
  816. for (; b < 5; b++) {
  817. var groupY = myPlayer.dir + toRad(b * 72);
  818. place(millType, groupY);
  819. }
  820. }
  821. if (a.keyCode == 80 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  822. var d = 0;
  823. for (; d < 4; d++) {
  824. groupY = myPlayer.dir + toRad(d * 90);
  825. place(spikeType, groupY);
  826. }
  827. }
  828. if (a.keyCode == 73 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  829. var e = 0;
  830. for (; e < 4; e++) {
  831. groupY = myPlayer.dir + toRad(e * 90);
  832. place(boostType, groupY);
  833. }
  834. }
  835. if (a.keyCode == 103 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  836. var f = 0;
  837. for (; f < 4; f++) {
  838. groupY = myPlayer.dir + toRad(f * 90);
  839. place(spikeType, groupY);
  840. }
  841. }
  842. if (a.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  843. place(turretType, myPlayer.dir + toRad(45));
  844. place(turretType, myPlayer.dir - toRad(45));
  845. }
  846. if (a.keyCode == 77 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  847. if (myPlayer.y < 2400) {
  848. hat(15);
  849. } else {
  850. if (myPlayer.y > 6850 && myPlayer.y < 7550) {
  851. hat(31);
  852. } else {
  853. hat(12);
  854. }
  855. }
  856. acc(11);
  857. }
  858. if (a.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  859. Hat(7);
  860. acc(21);
  861. setTimeout( () => {
  862. place(spikeType, myPlayer.dir + toRad(45));
  863. place(spikeType, myPlayer.dir - toRad(45));
  864. }, 65);
  865. setTimeout( () => {
  866. Hat(53);
  867. }, 50);
  868. setTimeout( () => {
  869. normalAcc = 11;
  870. if (myPlayer.y < 2400){
  871. normalHat = 15;
  872. } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
  873. normalHat = 31;
  874. } else {
  875. normalHat = 12;
  876. }
  877. }, 200);
  878. }
  879. if (a.keyCode == 66 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  880. Hat(6);
  881. }
  882. if (a.keyCode == 27 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  883. Hat(0);
  884. }
  885. if (a.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  886. Hat(53);
  887. }
  888. if (a.keyCode == 16 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  889. Hat(12);
  890. }
  891. if (a.keyCode == 188 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  892. Hat(15);
  893. }
  894. if (a.keyCode == 60 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  895. Hat(31);
  896. }
  897. if (a.keyCode == 90 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  898. Hat(40);
  899. }
  900. if (a.keyCode == 74 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  901. Hat(22);
  902. }
  903. if (a.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  904. Hat(7);
  905. acc(0)
  906. }
  907. if (a.keyCode == 75 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  908. Hat(11);
  909. acc(21);
  910. }
  911. if (a.keyCode == 78 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  912. walkmillhaha = !walkmillhaha;
  913. newSend(["ch", ["Mills : " + walkmillhaha]]);
  914. }
  915. if(a.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  916. autoaim = true;
  917. autoprimary = true;
  918. autosecondary = false;
  919. doinsta = true;
  920. newSend(["ch", ['??? Mod by FV215b (183-Legend)#8518']]);
  921. newSend(["13c", [0, 0, 1]]);
  922. newSend(["5", [primary, true]]);
  923. newSend(["7", [1]]);
  924. newSend(["13c", [1, 7, 0]]);
  925. newSend(["13c", [0, 7, 0]]);
  926. newSend(["13c", [1, 21, 1]]);
  927. newSend(["13c", [0, 21, 1]]);
  928. setTimeout( () => {
  929. autoprimary = false;
  930. autosecondary = true;
  931. newSend(["13c", [0, 0, 0]]);
  932. newSend(["13c", [1, 53, 0]]);
  933. newSend(["13c", [0, 53, 0]]);
  934. newSend(["5", [secondary, true]]);
  935. }, 35);//50 for a bit laggy pc//80 for a bit more laggier pc//100-120 for more laggier pc//you can use all speeds if you have good pc. find your speed..35 is stack
  936. setTimeout( () => {
  937. if (pikeinsta == true) {
  938. place(spikeType, nearestEnemyAngle);
  939. }
  940. newSend(["13c", [0, 0, 0]]);
  941. newSend(["13c", [0, 6, 0]]);
  942. newSend(["7", [1]]);
  943. newSend(["5", [primary, true]]);
  944. newSend(["13c", [0, 0, 1]]);
  945. autosecondary = false;
  946. autoaim = false;
  947. doinsta = false;
  948. if(document.getElementById('aimbot').checked) {
  949. autoaim = true;
  950. }
  951. }, 240);
  952. }
  953. if (a.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  954. autoprimary = false;
  955. autosecondary = true;
  956. autoaim = true;
  957. doinsta = true;
  958. newSend(["ch", ["reverse insta Dont Try"]]);
  959. newSend(["13c", [0, 0, 1]]);
  960. newSend(["5", [secondary, true]]);
  961. newSend(["7", [1]]);
  962. newSend(["13c", [1, 53, 0]]);
  963. newSend(["13c", [0, 53, 0]]);
  964. newSend(["13c", [1, 21, 1]]);
  965. newSend(["13c", [0, 21, 1]]);
  966. setTimeout( () => {
  967. autoprimary = true;
  968. autosecondary = false;
  969. newSend(["13c", [1, 7, 0]]);
  970. newSend(["13c", [0, 7, 0]]);
  971. newSend(["13c", [0, 21, 1]]);
  972. newSend(["5", [primary, true]]);
  973. newSend(["5", [primary, true]]);
  974. }, 45);
  975. setTimeout( () => {
  976. newSend(["13c", [0, 0, 0]]);
  977. newSend(["7", [1]]);
  978. newSend(["13c", [0, 11, 1]]);
  979. if (myPlayer.y < 2400){
  980. newSend(["13c", [0, 15, 0]]);
  981. } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
  982. newSend(["13c", [0, 31, 0]]);
  983. } else {
  984. newSend(["13c", [0, 12, 0]]);
  985. }
  986. autoprimary = false;
  987. autoaim = false;
  988. doinsta = false;
  989. if(document.getElementById('aimbot').checked) {
  990. autoaim = true;
  991. }
  992. }, 215);
  993. }
  994.  
  995. if (a.keyCode == 38 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  996. messageToggle = (messageToggle + 1) % 2;
  997. }
  998. if (a.keyCode == 40 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  999. clanToggle = (clanToggle + 1) % 2;
  1000. }
  1001. if (a.keyCode == 37 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1002. healToggle = (healToggle + 1) % 2;
  1003. if (healToggle == 0) {
  1004. if (hatToggle == 0) {
  1005. document.title = 'AutoHeal: OFF | AutoHat: OFF';
  1006. } else {
  1007. document.title = 'AutoHeal: OFF | AutoHat: ON';
  1008. }
  1009. } else {
  1010. if (hatToggle == 0) {
  1011. document.title = 'AutoHeal: ON | AutoHat: OFF';
  1012. } else {
  1013. document.title = 'AutoHeal: ON | AutoHat: ON';
  1014. }
  1015. }
  1016. }
  1017. if (a.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1018. if(primary == 0){
  1019. autoaim = true;
  1020. doinsta = true;
  1021. newSend(["ch", ['AgE 1 iNsTa [v2]']]);
  1022. newSend(["5", [primary, true]]);
  1023. newSend(["13c", [1, 7, 0]]);
  1024. newSend(["13c", [0, 7, 0]]);
  1025. newSend(["13c", [0, 0, 1]]);
  1026. newSend(["13c", [0, 21, 1]]);
  1027. newSend(["c", [1]]);
  1028. setTimeout( () => {
  1029. newSend(["6", [5]]);//polearm
  1030. newSend(["6", [17]]);//cookie
  1031. newSend(["6", [31]]);//trap
  1032. newSend(["6", [27]]);//better mill
  1033. newSend(["6", [10]]);//great hammer
  1034. newSend(["6", [38]]);//tp
  1035. }, 37);
  1036.  
  1037. setTimeout( () => {
  1038. newSend(["6", [4]]);//katana
  1039. newSend(["6", [15]]);//musket
  1040. }, 30);
  1041.  
  1042. setTimeout( () => {
  1043. autosecondary = true;
  1044. newSend(["5", [secondary, true]]);
  1045. newSend(["13c", [1, 53, 0]]);
  1046. newSend(["13c", [0, 53, 0]]);
  1047. }, 70)
  1048.  
  1049. setTimeout( () => {
  1050. autosecondary = false;
  1051. newSend(["5", [primary, true]]);
  1052. newSend(["c", [0, null]]);
  1053. newSend(["13c", [0, 6, 0]]);
  1054. autoaim = false;
  1055. doinsta = false;
  1056. if(document.getElementById('aimbot').checked) {
  1057. autoaim = true;
  1058. }
  1059. }, 200);
  1060. } else {
  1061. autoaim = true;
  1062. doinsta = true;
  1063. newSend(["ch", ['Insta kill ??? Die Hacker!!']]);
  1064. newSend(["5", [secondary, true]]);
  1065. newSend(["13c", [0, 21, 1]]);
  1066. newSend(["13c", [1, 53, 0]]);
  1067. newSend(["13c", [0, 53, 0]]);
  1068. newSend(["c", [1]]);
  1069.  
  1070. setTimeout( () => {
  1071. newSend(["13c", [0, 21, 1]]);
  1072. newSend(["13c", [0, 32, 0]]);
  1073. newSend(["6", [12]]);
  1074.  
  1075. }, 70);
  1076.  
  1077. setTimeout( () => {
  1078. newSend(["6", [15]]);
  1079.  
  1080. }, 50);
  1081.  
  1082. setTimeout( () => {
  1083. newSend(["c", [0]]);
  1084. newSend(["5", [primary, true]]);
  1085. autoaim = false;
  1086. doinsta = false;
  1087. if(document.getElementById('aimbot').checked) {
  1088. autoaim = true;
  1089. }
  1090. }, 300);
  1091. }
  1092. }
  1093. if(a.keyCode == 46 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1094. newSend(["6", [7]]);
  1095. newSend(["6", [17]]);
  1096. newSend(["6", [31]]);
  1097. newSend(["6", [27]]);
  1098. newSend(["6", [10]]);
  1099. newSend(["6", [38]]);
  1100. newSend(["6", [4]]);
  1101. newSend(["6", [15]]);
  1102. }
  1103. if(a.keyCode == 45 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1104. newSend(["6", [5]]);
  1105. newSend(["6", [17]]);
  1106. newSend(["6", [31]]);
  1107. newSend(["6", [23]]);
  1108. newSend(["6", [9]]);
  1109. newSend(["6", [38]]);
  1110. newSend(["6", [28]]);
  1111. newSend(["6", [15]]);
  1112. }
  1113. if (a.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1114. newSend(['6', [15]]);
  1115. }
  1116. if (a.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1117. newSend(['6', [4]]);
  1118. }
  1119. if (a.keyCode == 99 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1120. newSend(['6', [28]]);
  1121. }
  1122. if (a.keyCode == 105 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1123. newSend(['6', [28]]);
  1124. newSend(['6', [25]]);
  1125. }
  1126. if (a.keyCode == 39 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1127. hatToggle = (hatToggle + 1) % 2;
  1128. if (healToggle == 0) {
  1129. if (hatToggle == 0) {
  1130. document.title = 'Heal: OFF | Hat: OFF';
  1131. } else {
  1132. document.title = 'Heal: OFF | Hat: ON';
  1133. }
  1134. } else {
  1135. if (hatToggle == 0) {
  1136. document.title = 'Heal: ON | Hat: OFF';
  1137. } else {
  1138. document.title = 'Heal: ON | Hat: ON';
  1139. }
  1140. }
  1141. }
  1142. });
  1143. document['addEventListener']('keyup', function(a) {
  1144. turretPlacer['stop'](a.keyCode);
  1145. boostPlacer['stop'](a.keyCode);
  1146. spikePlacer['stop'](a.keyCode);
  1147. boostSpiker['stop'](a.keyCode);
  1148. ;
  1149. if (a.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {
  1150. setTimeout(function() {
  1151. newSend(['33', [null]]);
  1152. boostDir = null;
  1153. }, 10);
  1154. }
  1155. });
  1156. function isElementVisible(options) {
  1157. return options.offsetParent !== null;
  1158. }
  1159. function toRad(degrees) {
  1160. return degrees * 0.01745329251;
  1161. }
  1162. function dist(p1, p) {
  1163. return Math.sqrt(Math.pow(p.y - p1[2], 2) + Math.pow(p.x - p1[1], 2));
  1164. }
  1165. function animate(space, chance) {
  1166. let result = '';
  1167. let characters;
  1168. if(space) {
  1169. characters = '??? mod OP';
  1170. } else {
  1171. characters = '???'
  1172. }
  1173. if(space) {
  1174. characters = characters.padStart((30 - characters.length) / 2 + characters.length)
  1175. characters = characters.padEnd(30);
  1176. }
  1177. let count = 0;
  1178. for (let i = 0; i < characters.length; i++ ) {
  1179. if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 2 && characters.charAt(i) != " ") {
  1180. result += "_";
  1181. count++
  1182. } else {
  1183. result += characters.charAt(i);
  1184. }
  1185. }
  1186. return result;
  1187. }
  1188. 'use strict';
  1189. function update() {
  1190. var event = 0;
  1191. for (; event < 9; event++) {
  1192. if (isElementVisible(document['getElementById']('actionBarItem' + event['toString']()))) {
  1193. primary = event;
  1194. }
  1195. }
  1196. var div = 9;
  1197. for (; div < 16; div++) {
  1198. if (isElementVisible(document['getElementById']('actionBarItem' + div['toString']()))) {
  1199. secondary = div;
  1200. }
  1201. }
  1202. var tobj = 16;
  1203. for (; tobj < 19; tobj++) {
  1204. if (isElementVisible(document['getElementById']('actionBarItem' + tobj['toString']()))) {
  1205. foodType = tobj - 16;
  1206. }
  1207. }
  1208. var props = 19;
  1209. for (; props < 22; props++) {
  1210. if (isElementVisible(document['getElementById']('actionBarItem' + props['toString']()))) {
  1211. wallType = props - 16;
  1212. }
  1213. }
  1214. var e = 22;
  1215. for (; e < 26; e++) {
  1216. if (isElementVisible(document['getElementById']('actionBarItem' + e['toString']()))) {
  1217. spikeType = e - 16;
  1218. }
  1219. }
  1220. var f = 26;
  1221. for (; f < 29; f++) {
  1222. if (isElementVisible(document['getElementById']('actionBarItem' + f['toString']()))) {
  1223. millType = f - 16;
  1224. }
  1225. }
  1226. var g = 29;
  1227. for (; g < 31; g++) {
  1228. if (isElementVisible(document['getElementById']('actionBarItem' + g['toString']()))) {
  1229. mineType = g - 16;
  1230. }
  1231. }
  1232. var h = 31;
  1233. for (; h < 33; h++) {
  1234. if (isElementVisible(document['getElementById']('actionBarItem' + h['toString']()))) {
  1235. boostType = h - 16;
  1236. }
  1237. }
  1238. var intval = 33;
  1239. for (; intval < 39; intval++) {
  1240. if (isElementVisible(document['getElementById']('actionBarItem' + intval['toString']())) && intval != 36) {
  1241. turretType = intval - 16;
  1242. }
  1243. }
  1244. spawnpadType = 36;
  1245. }
  1246. ;
  1247. var menuChange = document.createElement("div");
  1248. menuChange.className = "menuCard";
  1249. menuChange.id = "mainSettings";
  1250. menuChange.innerHTML = `
  1251. <div id="simpleModal" class="modal">
  1252. <div class="modal-content">
  1253. <div class="modal-header">
  1254. <span class="closeBtn">&times;</span>
  1255. <h2 style="font-size: 17px;">??? mod menu</h2>
  1256. </div>
  1257. <div class="modal-body" style="font-size: 15px;">
  1258. <div class="flexControl">
  1259. <h2 style="font-size: 17px;">Menu</h2>
  1260. <label type="radio" class="container">Anti Insta<input type="checkbox" id="antiinsta">
  1261. <span class="checkmark"></span></label>
  1262. <label type="radio" class="container">put pike on instakill<input type="checkbox" id="putpike">
  1263. <span class="checkmark"></span></label>
  1264. <label type="radio" class="container">360Β° hit<input type="checkbox" id="360hit">
  1265. <span class="checkmark"></span></label>
  1266. <label type="radio" class="container">Auto Aim/Aim bot/Auto aim lock<input type="checkbox" id="aimbot">
  1267. <span class="checkmark"></span></label>
  1268. <label type="radio" class="container">click bull/tank<input type="checkbox" id="click">
  1269. <span class="checkmark"></span></label>
  1270. <label type="radio" class="container">auto ping msg?<input type="checkbox" id="pingy">
  1271. <span class="checkmark"></span></label>
  1272. <label type="radio" class="container">chat mirror?<input type="checkbox" id="cm">
  1273. <span class="checkmark"></span></label>
  1274. <label type="radio" class="container">autoreplace(trap)?(DONΒ΄T USE|NEED TO GET FIXED<input type="checkbox" id="ar">
  1275. <span class="checkmark"></span></label>
  1276. <label type="radio" class="container">damage counter(chat how many HP you have)?<input type="checkbox" id="dmgc">
  1277. <span class="checkmark"></span></label>
  1278. <label type="radio" class="container">Anti Ruby weapons/Auto venom gear if you got poisen?<input type="checkbox" id="antiruby">
  1279. <span class="checkmark"></span></label>
  1280. <label type="radio" class="container">Auto-Q if your ping is bigger than 200 and a enemy is near?<input type="checkbox" id="autoq">
  1281. <span class="checkmark"></span></label>
  1282. <div class="modal-body" style="font-size: 15px;">
  1283. <div class="flexControl">
  1284. <h2 style="font-size: 25px;">Trap settings</h2>
  1285. <label class="container">Anti-Pit-Trap?<input type="checkbox" id="antitrap">
  1286. <span class="checkmark"></span></label>
  1287. <label class="container">place spikes behind you if you got trapped?<input type="checkbox" id="placespike">
  1288. <span class="checkmark"></span></label>
  1289. <label class="container">place traps behind you if you got trapped?<input type="checkbox" id="placetrap">
  1290. <span class="checkmark"></span></label>
  1291. <label class="container">place mills behind you if you got trapped?<input type="checkbox" id="placemill">
  1292. <span class="checkmark"></span></label>
  1293. <label class="container">AutoBreak Pit-Trap?<input type="checkbox" id="autobreaktrap">
  1294. <span class="checkmark"></span></label>
  1295. <label class="container">Autoplace traps after autobreak?<input type="checkbox" id="autoplacetraps">
  1296. <span class="checkmark"></span></label>
  1297. </div>
  1298. <div class="modal-footer">
  1299. <p>Made by W4IT#1814</p>
  1300. </div>
  1301. </div>
  1302. `
  1303. document.body.appendChild(menuChange)
  1304. var styleItem1 = document.createElement("style");
  1305. styleItem1.type = "text/css";
  1306. styleItem1.appendChild(document.createTextNode(`
  1307. #mainSettings{
  1308. overflow-y : scroll;
  1309. }
  1310. .keyPressLow {
  1311. margin-left: 8px;
  1312. font-size: 16px;
  1313. margin-right: 8px;
  1314. height: 25px;
  1315. width: 50px;
  1316. background-color: #fcfcfc;
  1317. border-radius: 3.5px;
  1318. border: none;
  1319. text-align: center;
  1320. color: #4A4A4A;
  1321. border: 0.5px solid #f2f2f2;
  1322. }
  1323.  
  1324. .menuPrompt {
  1325. font-size: 17px;
  1326. font-family: 'Hammersmith One';
  1327. color: green;
  1328. flex: 0.2;
  1329. text-align: center;
  1330. margin-top: 10px;
  1331. display: inline-block;
  1332. }
  1333.  
  1334. .modal {
  1335. display: none;
  1336. position: fixed;
  1337. z-index: 1;
  1338. left: 0;
  1339. top: 0;
  1340. overflow: auto;
  1341. height: 100%;
  1342. width: 100%;
  1343. }
  1344.  
  1345. .modal-content {
  1346. margin: 10% auto;
  1347. width: 40%;
  1348. box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
  1349. font-size: 14px;
  1350. line-height: 1.6;
  1351. }
  1352.  
  1353. .modal-header h2,
  1354. .modal-footer h3 {
  1355. margin: 0;
  1356. }
  1357.  
  1358. .modal-header {
  1359. background: #black;
  1360. padding: 15px;
  1361. color: #black;
  1362. border-top-left-radius: 5px;
  1363. border-top-right-radius: 5px;
  1364. }
  1365.  
  1366. .modal-body {
  1367. padding: 10px 20px;
  1368. background: #orange;
  1369. }
  1370.  
  1371. .modal-footer {
  1372. background: #cf2727;
  1373. padding: 10px;
  1374. color: #orange;
  1375. text-align: center;
  1376. border-bottom-left-radius: 5px;
  1377. border-bottom-right-radius: 5px;
  1378. }
  1379.  
  1380. .closeBtn {
  1381. color: #orange;
  1382. float: right;
  1383. font-size: 30px;
  1384. color: #orange;
  1385. }
  1386.  
  1387. .closeBtn:hover,
  1388. .closeBtn:focus {
  1389. color: #orange;
  1390. text-decoration: none;
  1391. cursor: pointer;
  1392. }
  1393.  
  1394. /* Customize the label (the container) */
  1395. .container {
  1396. display: block;
  1397. position: relative;
  1398. padding-left: 35px;
  1399. margin-bottom: 12px;
  1400. cursor: pointer;
  1401. font-size: 16px;
  1402. -webkit-user-select: none;
  1403. -moz-user-select: none;
  1404. -ms-user-select: none;
  1405. user-select: none;
  1406. }
  1407.  
  1408. /* Hide the browser's default checkbox */
  1409. .container input {
  1410. position: absolute;
  1411. opacity: 0;
  1412. cursor: pointer;
  1413. height: 0;
  1414. width: 0;
  1415. }
  1416.  
  1417. /* Create a custom checkbox */
  1418. .checkmark {
  1419. position: absolute;
  1420. top: 0;
  1421. left: 0;
  1422. height: 25px;
  1423. width: 25px;
  1424. background-color: #FFA500;
  1425. }
  1426.  
  1427. /* On mouse-over, add a grey background color */
  1428. .container:hover input ~ .checkmark {
  1429. background-color: #FFA500;
  1430. }
  1431.  
  1432. /* When the checkbox is checked, add a red background */
  1433. .container input:checked ~ .checkmark {
  1434. background-color: #000000;
  1435. }
  1436.  
  1437. /* Create the checkmark/indicator (hidden when not checked) */
  1438. .checkmark:after {
  1439. content: "";
  1440. position: absolute;
  1441. display: none;
  1442. }
  1443.  
  1444. /* Show the checkmark when checked */
  1445. .container input:checked ~ .checkmark:after {
  1446. display: block;
  1447. }
  1448.  
  1449. /* Style the checkmark/indicator */
  1450. .container .checkmark:after {
  1451. left: 9px;
  1452. top: 5px;
  1453. width: 5px;
  1454. height: 10px;
  1455. border: solid white;
  1456. border-width: 0 3px 3px 0;
  1457. -webkit-transform: rotate(45deg);
  1458. -ms-transform: rotate(45deg);
  1459. transform: rotate(45deg);
  1460. }
  1461.  
  1462. `))
  1463. document.head.appendChild(styleItem1);
  1464.  
  1465. document.addEventListener('keydown', function(e) {
  1466. if (e.keyCode == 27){
  1467. if (modal.style.display = "none") {
  1468. modal.style.display = "block";
  1469. } else {
  1470. modal.style.display = "none";
  1471. }
  1472. }
  1473. })
  1474.  
  1475. var modal = document.getElementById("simpleModal");
  1476. var closeBtn = document.getElementsByClassName('closeBtn')[0];
  1477.  
  1478. closeBtn.addEventListener('click', closeModal);
  1479. window.addEventListener('click', outsideClick);
  1480.  
  1481. function closeModal() {
  1482. modal.style.display = 'none';
  1483. }
  1484. function outsideClick(e) {
  1485. if (e.target == modal) {
  1486. modal.style.display = 'none';
  1487. }
  1488. }
  1489. var ai = document.querySelector("#antiinsta")
  1490. ai.addEventListener('change', function() {
  1491. if (this.checked) {
  1492. antiinsta = true;
  1493. newSend(["ch", ["0n"]]);
  1494. } else {
  1495. newSend(["ch", ["0ff"]]);
  1496. antiinsta = false;
  1497. }
  1498. })
  1499. var at = document.querySelector("#antitrap")
  1500.  
  1501. at.addEventListener('change', function() {
  1502. if (this.checked) {
  1503. antitrap = true;
  1504. newSend(["ch", ["0n"]]);
  1505. } else {
  1506. antitrap = false;
  1507. newSend(["ch", ["0ff"]]);
  1508. }
  1509. })
  1510. var ps = document.querySelector("#placespike")
  1511.  
  1512. ps.addEventListener('change', function() {
  1513. if (this.checked) {
  1514. palcespikes = true;
  1515. newSend(["ch", ["0n"]]);
  1516. } else {
  1517. palcespikes = false;
  1518. newSend(["ch", ["0ff"]]);
  1519. }
  1520. })
  1521. var pt = document.querySelector("#placetrap")
  1522.  
  1523. pt.addEventListener('change', function() {
  1524. if (this.checked) {
  1525. palcetraps = true;
  1526. newSend(["ch", ["0n"]]);
  1527. } else {
  1528. palcetraps = false;
  1529. newSend(["ch", ["0ff"]]);
  1530. }
  1531. })
  1532. var pm = document.querySelector("#placemill")
  1533.  
  1534. pt.addEventListener('change', function() {
  1535. if (this.checked) {
  1536. palcemills = true;
  1537. newSend(["ch", ["0n"]]);
  1538. } else {
  1539. palcemills = false;
  1540. newSend(["ch", ["0ff"]]);
  1541. }
  1542. })
  1543. var abt = document.querySelector("#autobreaktrap")
  1544.  
  1545. abt.addEventListener('change', function() {
  1546. if (this.checked) {
  1547. autobreak = true;
  1548. newSend(["ch", ["0n"]]);
  1549. } else {
  1550. autobreak = false;
  1551. newSend(['c', [0]]);
  1552. intrap = false;
  1553. hat(0);
  1554. hat(6);
  1555. newSend(["ch", ["0ff"]]);
  1556. }
  1557. })
  1558.  
  1559. var apt = document.querySelector("#autoplacetraps")
  1560.  
  1561. apt.addEventListener('change', function() {
  1562. if (this.checked) {
  1563. autoplacetraps = true;
  1564. newSend(["ch", ["0n"]]);
  1565. } else {
  1566. autoplacetraps = false;
  1567. newSend(["ch", ["0ff"]]);
  1568. }
  1569. })
  1570.  
  1571. var pi = document.querySelector("#putpike")
  1572.  
  1573. pi.addEventListener('change', function() {
  1574. if (this.checked) {
  1575. pikeinsta = true;
  1576. newSend(["ch", ["0n"]]);
  1577. } else {
  1578. pikeinsta = false;
  1579. newSend(["ch", ["0ff"]]);
  1580. }
  1581. })
  1582.  
  1583. var aimb = document.querySelector("#aimbot")
  1584.  
  1585. aimb.addEventListener('change', function() {
  1586. if (this.checked) {
  1587. autoaim = true;
  1588. silentaim = true;
  1589. newSend(["ch", ["0n"]]);
  1590. } else {
  1591. autoaim = false;
  1592. silentaim = false;
  1593. newSend(["ch", ["0ff"]]);
  1594. }
  1595. })
  1596. //really decent hack
Add Comment
Please, Sign In to add comment