pancake mod [ PATCHED ]

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

目前为 2023-03-26 提交的版本,查看 最新版本

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