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-14 提交的版本,查看 最新版本

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