pancake mod [Unpatched]

thiis is a unpatched version of pancake mod use it all you want!

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