pancake mod | Katana + Musket | AUTOHEAL | Anti-Insta | starter resources and more!!

This is SISI´s HacK (i created SISI´s HacK) but I renamed it to pancake mod(cuz I like pancakes 🤣) So, look at the desc to see the commands! Enjoy the mod!

当前为 2021-07-22 提交的版本,查看 最新版本

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