pancake mod [ PATCHED ]

This mod is not bad, its just ok. To know the controls, look in the description! Enjoy :>

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