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

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