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