Greasy Fork is available in English.

pancake mod | Katana + Musket | AUTOHEAL | Anti-Insta | starter resources and more!!

This is SISI´s HacK but I renamed it to pancake mod(cuz I like pancakes 🤣) So, look at the desc to see the commands! Enjoy the mod!

// ==UserScript==
// @name         pancake mod | Katana + Musket | AUTOHEAL |  Anti-Insta  |  starter resources and more!!
// @version      v.9.2.7
// @description  This is SISI´s HacK but I renamed it to pancake mod(cuz I like pancakes 🤣) So, look at the desc to see the commands! Enjoy the mod!
// @author       BiG_LoOseR
// @match        *://moomoo.io/*
// @match        *://dev.moomoo.io/*
// @match        *://*.moomoo.io/*
// @match        *://sandbox.moomoo.io/*
// @require      https://code.jquery.com/jquery-3.3.1.slim.min.js
// @require      https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js
// @require      http://code.jquery.com/jquery-3.3.1.min.js
// @require      https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js
// @require      https://cdn.jsdelivr.net/npm/fontfaceobserver@2.1.0/fontfaceobserver.standalone.min.js
// @grant        none
// @namespace    -
// ==/UserScript==

setInterval(() => window.follmoo && follmoo(), 10); //starter resources

setInterval(function() {
    window.location.native_resolution = true;
}, 1000)//maybe more FPS

var autoreloadloop;
var autoreloadenough = 0;

autoreloadloop = setInterval(function () {
    if (autoreloadenough < 200) {
        if (document.getElementById("loadingText").innerHTML == `disconnected<a href="javascript:window.location.href=window.location.href" class="ytLink">reload</a>`) {
            document.title = "Disconnected? NP";
            clearInterval(autoreloadloop);
            setTimeout(function () {document.title = "Moo Moo";}, 1000)
            location.reload();
        }
        autoreloadenough++;
    }
    else if (autoreloadenough >= 300) {
        clearInterval(autoreloadloop);
        document.title = "there you are";
        setTimeout(function () {document.title = "Moo Moo";}, 1000)
    }
}, 50);//autoreload

setInterval(() => {
    setTimeout(() => {
        document.getElementById('chatBox').placeholder = "💬writing💬";
        setTimeout(() => {
            document.getElementById('chatBox').placeholder = "💬writing.💬";
            setTimeout(() => {
                document.getElementById('chatBox').placeholder = "💬writing..💬";
                setTimeout(() => {
                    document.getElementById('chatBox').placeholder = "💬writing...💬";
                }, 100);
            }, 100);
        }, 100);
    }, 100);
}, 500)

document.getElementById("enterGame").addEventListener('click', autohide);
function autohide(){
    $("#ot-sdk-btn-floating").hide();
}
document.getElementById("moomooio_728x90_home").style.display = "none";
$("#moomooio_728x90_home").parent().css({display: "none"});
document.getElementById('linksContainer2').innerHTML = ' pancakes are yummy! ' ;
document.getElementById('gameName').innerHTML = '🥞pancake mod🥞';
document.getElementById('loadingText').innerHTML = ' pancakes are being prepared... '
document.getElementById('diedText').innerHTML = ' !!💀Revange💀!! ';
document.getElementById('enterGame').innerHTML = ' have a nice game ';
document.getElementById('desktopInstructions').innerHTML = '  [N] For 3 Windmill.............................. [O] For 5 Windmills.......................... [H] For Turrets................................... [F] For BoostPad............................... [V] For Spike...................................... [P] For 4 Spikes.............................. [B] for Active/Unactive Auto Hat.  [T] for Active/Unactive AutoHeal. [R] for Insta-Kill................................ [I] for 4 Trap or BoostPad.............. [L] for Musket.................................... [1/Numpad] for Katana + Hammer............................................... [9/Numpad] for Spinning Spikes..  '
document.getElementById('gameName').style.color = "#fe1414";
document.getElementById('diedText').style.color = "#fe3200";
document.getElementById('loadingText').style.color = "#f76f16";
document.getElementById('nameInput').style.color = "#F70606";
document.getElementById("enterGame").style.color = "#000";
document.getElementById('leaderboard').style.color = "#ff1f3d";
document.title = ' pancake mod OP';
document.getElementById("leaderboard").append ('pancake mod');
document.querySelector("#leaderboard").appendChild(
  (function() {
    let text = "Ping: ";
      let text2 = " ms";
    let oldPing = 0;
    const pingSpan = document.createElement("span");
    pingSpan.id = "pingTime";
    pingSpan.textContent = text;
    pingSpan.style.display = "inline-block";
    setInterval(function() {
      typeof pingTime !== "undefined" &&
        oldPing !== pingTime &&
        ((oldPing = pingTime),
        (pingSpan.textContent = text + oldPing + text2),
        (function() {
          if (oldPing <= 100) {
            pingSpan.style.color = "green";
          }
          if (oldPing >= 101 && oldPing <= 250) {
            pingSpan.style.color = "Orange";
          }
          if (oldPing >= 251) {
            pingSpan.style.color = "red";
          }
        })());
    });
    return pingSpan;
  })()
);
document.getElementById("promoImgHolder").remove();
document.getElementById('ageText').style.color = "#ff1f3d";


document.querySelector("#pre-content-container").remove(); //ANTI AD

$('.menuCard').css({'white-space': 'normal',
                    'text-align': 'left',
                    'background-color': 'rgba(0, 0, 0, 0.74)',
                    '-moz-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
                    '-webkit-box-shadow': '0px 0px rgba(255, 255, 255, 0)',
                    'box-shadow': '0px 0px rgba(255, 255, 255, 0)',
                    '-webkit-border-radius': '0px',
                    '-moz-border-radius': '0px',
                    'border-radius': '0px',
                    'margin': '15px',
                    'margin-top': '15px'});

$('.actionBarItem').css({'-webkit-border-radius': '0px',
                         'border-radius': '3px',
                         'background-color': 'rgba(0, 0, 0, 0.4)'});

$('.menuCard').css({'color':'#808080'});



$("#youtuberOf").remove();
$("#adCard").remove();
$("#mobileInstructions").remove();
$("#downloadButtonContainer").remove();
$("#mobileDownloadButtonContainer").remove();
$(".downloadBadge").remove();

$("#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</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>');

var musics=[{
  name: "Vmz - Plutão",
  msc: "https://cdn.discordapp.com/attachments/829054751601721354/829057185056948276/vmz_plutao_6979047102050399469.mp3"
}, {
  name: "MhRap - Vibe do zabuza",
  msc:  "https://cdn.discordapp.com/attachments/829054751601721354/829058226171019294/vibe_zabuza_animes_style_trap_prod_ihaksi_mhrap_-5421045193047514059.mp3"
},{
  name: "Vmz - Eu sou o Zetsu",
  msc: "https://cdn.discordapp.com/attachments/829054751601721354/829059227401060353/vmz_eu_sou_zetsu_-688032162626482960.mp3"
}, {
  name: "Rob Gasser - Ricochet",
  msc: "https://cdn.discordapp.com/attachments/829054751601721354/829061218475049040/rob_gasser_ricochet_ncs_release_147707616798364197.mp3"
}, {
  name: "Astronomia Remix",
  msc: "https://cdn.discordapp.com/attachments/728226830414381056/731040059054096404/Astronomia_Remix_By_Jiaye_Trending_TikTok_EDM_Full_Version.mp3"
}]


let musicmenu = document.createElement('div')
musicmenu.innerHTML="<h1 style='color:#fff;text-shadow:2px 2px 2px black;margin:10px;font-weight;1000;'>PlayList</h1><br>"


for(let i=0;i<musics.length;i++){
  musicmenu.innerHTML+=`
  <h3 style="text-shadow:1px 1px 2px black;margin-top:15px;margin-left:2.5%">`+musics[i].name+`</h3>
  <audio style="width: 90%; margin-left: 2.5%; margin-top:10px;" src="`+musics[i].msc+`" controls="" loop=""></audio><hr>
  `
}
musicmenu.style=`
display:none;
overflow:auto;
position:absolute;
top:50%;
left:50%;
margin-top:-200px;
margin-left:-350px;
z-index:1000000;
border:7px solid black;
width:700px;
height:400px;
border-radius:25px;
background-color:#f71b1b;
`
document.body.prepend(musicmenu)
document.addEventListener("keydown", (e)=>{
  if(e.keyCode == 45){
      if(musicmenu.style.display=="block"){
        musicmenu.style.display="none"
      }else{
        musicmenu.style.display="block"
      }
  }
})
$("#mapDisplay").css({background: `url('http://i.imgur.com/Qllo1mA.png')`});

document.getElementById("storeHolder").style = "height: 500px; width: 435px;";

let newImg = document.createElement("img");
newImg.src = "data:image/png;base64,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";
newImg.style = `position: absolute; bottom: 200px; left: 15px; z-index: 100000; width: 65px; height: 65px; cursor: pointer;`;
document.body.prepend(newImg);

newImg.addEventListener("click", () => {
    let w = window.open("https://discord.gg/4skVv2dZZs", null, `height=650, width=1199, status=yes, toolbar=no, menubar=no, location=no`);
});

'use strict';
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
var i = 0;
var arr2 = Array(arr.length);
for (; i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return Array.from(arr);
}
}
var mouseX = void 0;
var mouseY = void 0;
var width = void 0;
var height = void 0;
setInterval(function() {
if (clanToggle == 1) {
doNewSend(['9', [null]]);
doNewSend(['8', [animate(false, 5)]]);
}
doNewSend(['testing', [6]]);
}, 200);
setInterval(function() {
if (messageToggle == 1) {
doNewSend(["ch", [animate(true, 5)]])
}
}, 0);
setInterval(function() {
if (autosecondary == true) {
doNewSend(["5", [secondary, true]]);
}
}, 1);
setInterval(function() {
if (autoprimary == true) {
doNewSend(["5", [primary, true]]);
}
}, 1);
setInterval(() => {
       if(hit360 == true) {
       doNewSend(["2", [7.8715926535897935e+270]]);
    }
}, 0);
setInterval ( () => {
    if (autobreak == true && intrap == true) {
        if (secondary == 10) {
         doNewSend(["5", [secondary, true]]);
        } else {
            doNewSend(["5", [primary, true]]);
        }
      doNewSend(["2", [trap_a]]); //hit
      doNewSend(["13c", [0, 40, 0]]);
      doNewSend(["13c", [0, 21, 1]]);
      doNewSend(["c", [1, trap_a]]);
    }
}, 5);
setInterval(function() {
if (autoaim == true) {
doNewSend(['2', [nearestEnemyAngle]]);
}
}, 0);
setInterval(function() {
if (hatToggle == 1) {
if (oldHat != normalHat) {
hat(normalHat);
console.log('Tried. - Hat');
}
if (oldAcc != normalAcc) {
acc(normalAcc);
console.log('Tried. - Acc');
}
oldHat = normalHat;
oldAcc = normalAcc;
}
}, 25);
function normal() {
hat(normalHat);
acc(normalAcc);
}
function aim(a, b) {
var target = document.getElementById('gameCanvas');
target.dispatchEvent(new MouseEvent('mousemove', {
clientX : a,
clientY : b
}));
}
var coreURL = new URL(window.location.href);
window.sessionStorage.force = coreURL.searchParams.get('fc');

const CanvasAPI = document.getElementById("gameCanvas")
CanvasAPI.addEventListener("mousedown", buttonPressD, false);
//2 - right
//1 - scroll wheel
//0 - left
function buttonPressD(e) {
    if (clik == true) {
        if (e.button == 2) {
            hat(40);
            acc(21);
            doNewSend(["7", [1]])
            setTimeout( () => {
                acc(11);
                if (myPlayer['y'] < 2400) {
                    hat(15);
                } else {
                    if (myPlayer['y'] > 6850 && myPlayer['y'] < 7550) {
                        hat(31);
                    } else {
                        hat(12);
                    }
                }
                doNewSend(["7", [1]])
            }, 100);
        }
    }
    if (e.button == 0) {
        if (clik == true) {
            hat(7);
            acc(21);
            doNewSend(["7", [1]])
            setTimeout( () => {
                acc(11);
                if (myPlayer.y < 2400) {
                    hat(15);
                } else {
                    if (myPlayer.y > 6850 && myPlayer.y < 7550) {
                        hat(31);
                    } else {
                        hat(12);
                    }
                }
                doNewSend(["7", [1]])
            }, 100);
        }
    }
}
var autosecondary = false
var autoprimary = false
var hit360 = false;
var spaceinsta = false;
var pikeinsta = false;
var antitrap = false;
var palcespikes = false;
var palcetraps = false;
var autoplacetraps = false;
var autobreak = false;
var clik = false;
var lasthat = 6;
var instahat = 0;
var nearestEnemy;
var nearestEnemyAngle;
var nearestTribeAngle;
var isEnemyNear;
var primary;
var secondary;
var foodType;
var wallType;
var spikeType;
var millType;
var mineType;
var boostType;
var turretType;
var spawnpadType;
var autoaim = false;
var tick = 1;
var instaSpeed = 230;
var oldHat;
var oldAcc;
var enemiesNear;
var normalHat;
var normalAcc;
var ws;
var msgpack5 = msgpack;
var boostDir;
var myPlayeroldx;
var myPlayeroldy;
var automillx = 10;
var automilly = 10;
var walkmillhaha = false;
var myPlayer = {
id : null,
x : null,
y : null,
dir : null,
object : null,
weapon : null,
clan : null,
isLeader : null,
hat : null,
accessory : null,
isSkull : null
};
var healSpeed = 100;
var messageToggle = 0;
var clanToggle = 0;
var healToggle = 1;
var hatToggle = 1;
var antiinsta = 0;
let trap_a = null;
let intrap = false;
let trapid = null;

document.msgpack = msgpack;
function n() {
this.buffer = new Uint8Array([0]);
this.buffer.__proto__ = new Uint8Array;
this.type = 0;
}
WebSocket.prototype.oldSend = WebSocket.prototype.send;
WebSocket.prototype.send = function(data) {
if (!ws) {
document.ws = this;
ws = this;
socketFound(this);
}
this.oldSend(data);
};
function socketFound(socket) {
socket.addEventListener('message', function(data) {
handleMessage(data);
});
}
'use strict';
function handleMessage(_x17) {
var b = msgpack5['decode'](new Uint8Array(_x17['data']));
var node = void 0;
if (b['length'] > 1) {
node = [b[0]]['concat'](_toConsumableArray(b[1]));
if (node[1] instanceof Array) {
node = node;
}
} else {
node = b;
}
var token = node[0];
if (!node) {
return;
}
if (token === 'io-init') {
var docElem = document['getElementById']('gameCanvas');
width = docElem['clientWidth'];
height = docElem['clientHeight'];
$(window)['resize'](function() {
width = docElem['clientWidth'];
height = docElem['clientHeight'];
});
docElem['addEventListener']('mousemove', function(res) {
mouseX = res['clientX'];
mouseY = res['clientY'];
});
}
if (token == '1' && myPlayer.id == null) {
myPlayer.id = node[1];
}
if (token == '33') {
enemiesNear = [];
var f = 0;
for (; f < node[1]['length'] / 13; f++) {
var object = node[1]['slice'](13 * f, 13 * f + 13);
if (object[0] == myPlayer.id) {
myPlayer['x'] = object[1];
myPlayer['y'] = object[2];
myPlayer['dir'] = object[3];
myPlayer['object'] = object[4];
myPlayer['weapon'] = object[5];
myPlayer['clan'] = object[7];
myPlayer['isLeader'] = object[8];
myPlayer['hat'] = object[9];
myPlayer['accessory'] = object[10];
myPlayer['isSkull'] = object[11];
} else if(object[7] != myPlayer.clan || object[7] === null) {
                enemiesNear.push(object);
            }
}
}
isEnemyNear = ![];
if (enemiesNear) {
nearestEnemy = enemiesNear['sort'](function(line, i) {
return dist(line, myPlayer) - dist(i, myPlayer);
})[0];
}
    if(nearestEnemy) {
        nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
        if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 300) {
            isEnemyNear = true;
            if(autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
                normalHat = 6;
                if(primary != 8) {
                    normalAcc = 19
                }
            };
        }
    }
    if(isEnemyNear == false && autoaim == false) {
        normalAcc = 11;
        if (myPlayer.y < 2400){
            normalHat = 15;
        } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
            normalHat = 31;
        } else {
            normalHat = 12;
        }
    }
if (!nearestEnemy) {
    nearestEnemyAngle = myPlayer['dir'];
}
    if(automillx == false){
        automillx = myPlayer.x;
    }
    if(automilly == false){
        automilly = myPlayer.y;
    }
    if(myPlayeroldy != myPlayer.y || myPlayeroldx != myPlayer.x){
        if (walkmillhaha==true) {
            if(Math.sqrt(Math.pow((myPlayer.y-automilly), 2) + Math.pow((myPlayer.x-automillx), 2)) > 100) {
                place(millType, Math.atan2(myPlayeroldy - myPlayer.y, myPlayeroldx - myPlayer.x) + toRad(78));
                place(millType, Math.atan2(myPlayeroldy - myPlayer.y, myPlayeroldx - myPlayer.x) - toRad(78));
                place(millType, Math.atan2(myPlayeroldy - myPlayer.y, myPlayeroldx - myPlayer.x) - toRad(0));
                doNewSend(["2", [Math.atan2(mouseY - height / 2, mouseX - width / 2)]]);
                automillx = myPlayer.x;
                automilly = myPlayer.y;
            }
        }
        myPlayeroldx = myPlayer.x;
        myPlayeroldy = myPlayer.y;
    }
    if(token == "6"){
        if(antitrap == true) {
            for(let i = 0; i < node[1].length / 8; i++){
                let ObjectData = node[1].slice(8*i, 8*i+8);
                if(ObjectData[6] == 15 && ObjectData[7] != myPlayer.id){
                    trap_a = Math.atan2(ObjectData[2] - myPlayer.y, ObjectData[1] - myPlayer.x);
                    if(Math.sqrt(Math.pow((myPlayer.y-ObjectData[2]), 2) + Math.pow((myPlayer.x-ObjectData[1]), 2)) < 90){
                        intrap = true;
                        trapid = ObjectData[0];
                        if (palcetraps == true) {
                            for (let i=0;i<10;i++){
                                let angle = myPlayer.dir + toRad(i * 16);
                                place(boostType, angle);
                            }
                        } else if (palcespikes == true) {
                            for (let i=0;i<10;i++){
                                let angle = myPlayer.dir + toRad(i * 16);
                                place(spikeType, angle);
                            }
                        }
                    }
                }
            }
        }
    }
    if (token == "12") {
        if(intrap == true) {
            if(trapid == node[1]) {
                intrap = false;
                doNewSend(["c", [0]]);
                doNewSend(["13c", [0, 6, 0]]);
                    doNewSend(["13c", [0, 11, 1]]);
                if(autoplacetraps) {
                    for (let i=0;i<4;i++){
                        let angle = myPlayer.dir + toRad(i * 90);
                        place(boostType, angle)
                    }
                    
                }
            }
        }
    }
    if (token == 'h' && node[1] == myPlayer.id) {
        if (node[2] < 100 && node[2] > 0 && healToggle == 1) {
            setTimeout(function() {
                place(foodType, null);
            }, healSpeed);
        }
    }
    if (token == 'h' && node[1] == myPlayer.id) {
        if (node[2] < 40 && node[2] > 0 && antiinsta == true) {
            hat(22);
            place(foodType);//eat pancake
            place(foodType);//eat pancake
            place(foodType);//eat pancake
            place(foodType);//eat pancake
            place(foodType);
        }
        if (token == 'h' && node[1] == myPlayer.id) {
            if (node[2] < 31 && node[2] > 0 && antiinsta == true) {
               hat(6)
                place(foodType);//eat pancake
                place(foodType);//eat pancake
                place(foodType);//eat pancake
                place(foodType);//eat pancake
                place(foodType);//eat pancake
            }
        }
    }
    if (token == 'h' && node[1] == myPlayer.id) {
        if (node[2] <= 60 && node[2] > 0 && antiinsta == true) {
            hat(6);
            place(foodType);//eat pancake
            place(foodType);//eat pancake
            place(foodType);//eat pancake
            place(foodType);//eat pancake
            setTimeout( () => {
                hat(22)
                place(foodType);//eat pancake
            }, 10);
            setTimeout( () => {
                hat(7);
            }, 320);
            setTimeout( () => {
                hat(6);
            }, 1900);
        }
    }
    update();
}
;
function doNewSend(data) {
    ws.send(new Uint8Array(Array.from(msgpack5.encode(data))));
}
function acc(op) {
    doNewSend(['13c', [0, 0, 1]]);
    doNewSend(['13c', [0, op, 1]]);
}
function Hat(id){
    storeBuy(id);
    storeEquip(id);
}
function hat(ctx) {
    doNewSend(['13c', [0, ctx, 0]]);
}
function place(p__14702) {
var angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Math.atan2(mouseY - height / 2, mouseX - width / 2);
doNewSend(['5', [p__14702, null]]);
doNewSend(['c', [1, angle]]);
doNewSend(['c', [0, angle]]);
doNewSend(['5', [myPlayer.weapon, true]]);
doNewSend(['5', [p__14702, null]]);
doNewSend(['c', [1, angle]]);
doNewSend(['c', [0, angle]]);
doNewSend(['5', [myPlayer.weapon, true]]);
}
function boostSpike() {
if (boostDir == null) {
boostDir = nearestEnemyAngle;
}
place(spikeType, boostDir + toRad(90));
place(spikeType, boostDir - toRad(90));
place(boostType, boostDir);
doNewSend(['33', [boostDir]]);
}
'use strict';
var repeater = function mockedDriverFn(element, method, options) {
var d = ![];
var e = undefined;
return {
'start' : function start(child) {
if (child == element && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
d = !![];
if (e === undefined) {
e = setInterval(function() {
method();
if (!d) {
clearInterval(e);
e = undefined;
console['log']('claered');
}
}, options);
}
}
},
'stop' : function Chat(parent) {
if (parent == element && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
d = ![];
}
}
};
};
'use strict';
var healer = repeater(81, function() {
    place(foodType);
}, 1);
var boostPlacer = repeater(70, function() {
place(boostType);
}, 0);
var spikePlacer = repeater(86, function() {
place(spikeType);
}, 0);
var turretPlacer = repeater(72, function() {
place(turretType);
}, 0);
var boostSpiker = repeater(71, function() {
place(boostSpike());
}, 0);
var millPlacer = repeater(78, () => {place(millType, Math.atan2(mouseY - height / 2, mouseX - width / 2) + toRad(180));
                                       place(millType, Math.atan2(mouseY - height / 2, mouseX - width / 2) - toRad(90));
                                       place(millType, Math.atan2(mouseY - height / 2, mouseX - width / 2) + toRad(90));
                                       }, -999);
document['addEventListener']('keydown', function(a) {
    healer['start'](a['keyCode']);
    boostPlacer['start'](a['keyCode']);
    spikePlacer['start'](a['keyCode']);
    turretPlacer['start'](a['keyCode']);
    boostSpiker['start'](a['keyCode']);
    millPlacer['start'](a['keyCode']);
if (a['keyCode'] == 79 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
var b = 0;
for (; b < 5; b++) {
var groupY = myPlayer['dir'] + toRad(b * 72);
place(millType, groupY);
}
}
if (a['keyCode'] == 80 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
var d = 0;
for (; d < 4; d++) {
groupY = myPlayer['dir'] + toRad(d * 90);
place(spikeType, groupY);
}
}
if (a['keyCode'] == 73 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
var e = 0;
for (; e < 4; e++) {
groupY = myPlayer['dir'] + toRad(e * 90);
place(boostType, groupY);
}
}
if (a['keyCode'] == 103 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
var f = 0;
for (; f < 4; f++) {
groupY = myPlayer['dir'] + toRad(f * 90);
place(spikeType, groupY);
}
}
if (a['keyCode'] == 72 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
place(turretType, myPlayer['dir'] + toRad(45));
place(turretType, myPlayer['dir'] - toRad(45));
}
if (a['keyCode'] == 77 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
if (myPlayer['y'] < 2400) {
hat(15);
} else {
if (myPlayer['y'] > 6850 && myPlayer['y'] < 7550) {
hat(31);
} else {
hat(12);
}
}
acc(11);
}
        if(a['keyCode'] == 75 && document.activeElement.id.toLowerCase() !== 'chatbox') {
           hit360 = !hit360;
            doNewSend(["ch", ["360 hit = " + hit360]]);
        }
    if(a['keyCode'] == 63 && document.activeElement.id.toLowerCase() !== 'chatbox') {
           clik = !clik;
            doNewSend(["ch", ["click bull/tank = " + clik]]);
        }
if (a['keyCode'] == 32 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
    if(spaceinsta == true) {
Hat(7);
acc(21);
    setTimeout( () => {
place(spikeType, myPlayer['dir'] + toRad(45));
place(spikeType, myPlayer['dir'] - toRad(45));
        }, 75);
    setTimeout( () => {
     Hat(53);
        }, 90);
    setTimeout( () => {
            normalAcc = 11;
        if (myPlayer.y < 2400){
            normalHat = 15;
        } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
            normalHat = 31;
        } else {
	        normalHat = 12;
        }
    }, 200);
    }
    }
    if(a['keyCode'] == 173 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
        autoaim = true;
        doNewSend(["ch", ['Pls dont kill me.. me age 1 :V']]);
            doNewSend(["5", [primary, true]]);
        doNewSend(["13c", [0, 7, 0]]);
        doNewSend(["13c", [0, 0, 1]]);
        doNewSend(["13c", [0, 18, 1]]);
            doNewSend(["c", [1]]);

        setTimeout( () => {
            doNewSend(["6", [5]]);
        }, 100);

        setTimeout( () => {
            doNewSend(["13c", [0, 53, 0]]);
            place(spikeType, null);
        }, 180);

        setTimeout( () => {
            doNewSend(["5", [primary, true]]);
            doNewSend(["c", [0, null]]);
            doNewSend(["13c", [0, 0, 0]]);
            doNewSend(["13c", [0, 6, 0]]);
            doNewSend(["13c", [0, 19, 1]]);
            autoaim = false;
        }, 200);
    }
if (a['keyCode'] == 66 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(6);
acc(0);
}
if (a['keyCode'] == 27 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(0);
}
if (a['keyCode'] == 85 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(53);
}
    if (a['keyCode'] == 78 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
        walkmillhaha = !walkmillhaha;
        doNewSend(["ch", ["Mills : " + walkmillhaha]]);
    }
if (a['keyCode'] == 16 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(12);
}
if (a['keyCode'] == 188 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(15);
}
if (a['keyCode'] == 60 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(31);;
}
if (a['keyCode'] == 90 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(40);
}
if (a['keyCode'] == 74 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(22);
}
if (a['keyCode'] == 84 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
Hat(7);
acc(0)
}
if(a.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
            autoaim = true;
            autoprimary = true;
            autosecondary = false;
            doNewSend(["ch", ['pancake Mod v.9.2 by WAIT#1814']]);
            doNewSend(["13c", [0, 0, 1]]);
            doNewSend(["5", [primary, true]]);
            doNewSend(["7", [1]]);
            doNewSend(["13c", [1, 7, 0]]);
            doNewSend(["13c", [0, 7, 0]]);
            doNewSend(["13c", [1, 21, 1]]);
            doNewSend(["13c", [0, 21, 1]]);
        setTimeout( () => {
            autoprimary = false;
            autosecondary = true;
            doNewSend(["13c", [0, 0, 0]]);
            doNewSend(["13c", [1, 53, 0]]);
            doNewSend(["13c", [0, 53, 0]]);
            doNewSend(["5", [secondary, true]]);
        }, 70);
        setTimeout( () => {
            if (pikeinsta == true) {
                place(spikeType, nearestEnemyAngle);
            }
            doNewSend(["13c", [0, 0, 0]]);
            doNewSend(["13c", [1, 6, 0]]);
            doNewSend(["13c", [0, 6, 0]]);
            doNewSend(["7", [1]]);
            doNewSend(["5", [primary, true]]);
            doNewSend(["13c", [0, 0, 1]]);
            autosecondary = false;
            autoaim = false;
        }, 240);
    }
        if (a.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') {
            autoprimary = false;
            autosecondary = true;
            autoaim = true;
            autoprimary = false;
            autosecondary = true;
            doNewSend(["ch", ["reverse insta"]]);
            doNewSend(["13c", [0, 0, 1]]);
            doNewSend(["5", [secondary, true]]);
            doNewSend(["7", [1]]);
            doNewSend(["13c", [1, 53, 0]]);
            doNewSend(["13c", [0, 53, 0]]);
            doNewSend(["13c", [1, 21, 1]]);
            doNewSend(["13c", [0, 21, 1]]);
        setTimeout( () => {
            autoprimary = true;
            autosecondary = false;
                        doNewSend(["13c", [1, 7, 0]]);
            doNewSend(["13c", [0, 7, 0]]);
            doNewSend(["5", [primary, true]]);
            doNewSend(["13c", [0, 0, 0]]);
            doNewSend(["13c", [0, 0, 1]]);
            doNewSend(["13c", [1, 7, 0]]);
            doNewSend(["13c", [0, 7, 0]]);
            doNewSend(["13c", [1, 18, 1]]);
            doNewSend(["13c", [0, 18, 1]]);
            doNewSend(["5", [primary, true]]);
        }, 80);
        setTimeout( () => {
            doNewSend(["13c", [0, 0, 0]]);
            doNewSend(["7", [1]]);
            doNewSend(["13c", [0, 11, 1]]);
            if (myPlayer.y < 2400){
                doNewSend(["13c", [0, 15, 0]]);
            } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
                doNewSend(["13c", [0, 31, 0]]);
            } else {
	            doNewSend(["13c", [0, 12, 0]]);
            }
            autoprimary = false;
            autoaim = false;
        }, 215);
                }

if (a['keyCode'] == 38 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
messageToggle = (messageToggle + 1) % 2;
}
if (a['keyCode'] == 40 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
clanToggle = (clanToggle + 1) % 2;
}
if (a['keyCode'] == 37 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
healToggle = (healToggle + 1) % 2;
if (healToggle == 0) {
if (hatToggle == 0) {
document['title'] = 'AutoHeal: OFF | AutoHat: OFF';
} else {
document['title'] = 'AutoHeal: OFF | AutoHat: ON';
}
} else {
if (hatToggle == 0) {
document['title'] = 'AutoHeal: ON | AutoHat: OFF';
} else {
document['title'] = 'AutoHeal: ON | AutoHat: ON';
}
}
}
    if (a['keyCode'] == 76 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
    autoaim = true;
    doNewSend(["ch", ['LmAO']]);
       doNewSend(["5", [secondary, true]]);
           doNewSend(["13c", [0, 32, 0]]);
           doNewSend(["13c", [0, 21, 1]]);
       doNewSend(["13c", [0, 53, 0]]);
       doNewSend(["c", [1]]);

       setTimeout( () => {
           doNewSend(["13c", [0, 32, 19]]);
           doNewSend(["13c", [0, 21, 1]]);
           doNewSend(["13c", [0, 32, 0]]);
           doNewSend(["6", [12]]);

       }, 85);

       setTimeout( () => {
           doNewSend(["6", [15]]);

       }, 97);

       setTimeout( () => {
           doNewSend(["c", [0]]);
           doNewSend(["5", [primary, true]]);
           autoaim = false;
       }, 300);
    }
        if(a.keyCode == 46 && document.activeElement.id.toLowerCase() !== 'chatbox') { //ent km
        doNewSend(["6", [7]]);
        doNewSend(["6", [17]]);
        doNewSend(["6", [31]]);
        doNewSend(["6", [27]]);
        doNewSend(["6", [10]]);
        doNewSend(["6", [38]]);
        doNewSend(["6", [4]]);
        doNewSend(["6", [15]]);
    }
        if(a.keyCode == 45 && document.activeElement.id.toLowerCase() !== 'chatbox') { // einfg  pm
        doNewSend(["6", [5]]);
        doNewSend(["6", [17]]);
        doNewSend(["6", [31]]);
        doNewSend(["6", [23]]);
        doNewSend(["6", [9]]);
        doNewSend(["6", [38]]);
        doNewSend(["6", [28]]);
        doNewSend(["6", [15]]);
    }
if (a['keyCode'] == 98 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
doNewSend(['6', [15]]);
}
if (a['keyCode'] == 99 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
doNewSend(['6', [28]]);
}
if (a['keyCode'] == 105 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
doNewSend(['6', [28]]);
doNewSend(['6', [25]]);
}
if (a['keyCode'] == 39 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
hatToggle = (hatToggle + 1) % 2;
if (healToggle == 0) {
if (hatToggle == 0) {
document['title'] = 'Heal: OFF | Hat: OFF';
} else {
document['title'] = 'Heal: OFF | Hat: ON';
}
} else {
if (hatToggle == 0) {
document['title'] = 'Heal: ON | Hat: OFF';
} else {
document['title'] = 'Heal: ON | Hat: ON';
}
}
}
});
document['addEventListener']('keyup', function(a) {
    healer['stop'](a['keyCode']);
    turretPlacer['stop'](a['keyCode']);
    boostPlacer['stop'](a['keyCode']);
    spikePlacer['stop'](a['keyCode']);
    boostSpiker['stop'](a['keyCode']);
    millPlacer['stop'](a['keyCode']);
;
if (a['keyCode'] == 71 && document['activeElement']['id']['toLowerCase']() !== 'chatbox') {
setTimeout(function() {
doNewSend(['33', [null]]);
boostDir = null;
}, 10);
}
});
function isElementVisible(options) {
return options.offsetParent !== null;
}
function toRad(degrees) {
return degrees * 0.01745329251;
}
function dist(p1, p) {
return Math.sqrt(Math.pow(p.y - p1[2], 2) + Math.pow(p.x - p1[1], 2));
}
function animate(space, chance) {
    let result = '';
    let characters;
    if(space) {
        characters = 'pancake mod OP';
    } else {
        characters = 'pancake'
    }
    if(space) {
        characters = characters.padStart((30 - characters.length) / 2 + characters.length)
        characters = characters.padEnd(30);
    }
    let count = 0;
    for (let i = 0; i < characters.length; i++ ) {
       if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 2 && characters.charAt(i) != " ") {
           result += "";
           count++
       } else {
           result += characters.charAt(i);
       }
    }
    return result;
}
'use strict';
function update() {
var event = 0;
for (; event < 9; event++) {
if (isElementVisible(document['getElementById']('actionBarItem' + event['toString']()))) {
primary = event;
}
}
var div = 9;
for (; div < 16; div++) {
if (isElementVisible(document['getElementById']('actionBarItem' + div['toString']()))) {
secondary = div;
}
}
var tobj = 16;
for (; tobj < 19; tobj++) {
if (isElementVisible(document['getElementById']('actionBarItem' + tobj['toString']()))) {
foodType = tobj - 16;
}
}
var props = 19;
for (; props < 22; props++) {
if (isElementVisible(document['getElementById']('actionBarItem' + props['toString']()))) {
wallType = props - 16;
}
}
var e = 22;
for (; e < 26; e++) {
if (isElementVisible(document['getElementById']('actionBarItem' + e['toString']()))) {
spikeType = e - 16;
}
}
var f = 26;
for (; f < 29; f++) {
if (isElementVisible(document['getElementById']('actionBarItem' + f['toString']()))) {
millType = f - 16;
}
}
var g = 29;
for (; g < 31; g++) {
if (isElementVisible(document['getElementById']('actionBarItem' + g['toString']()))) {
mineType = g - 16;
}
}
var h = 31;
for (; h < 33; h++) {
if (isElementVisible(document['getElementById']('actionBarItem' + h['toString']()))) {
boostType = h - 16;
}
}
var intval = 33;
for (; intval < 39; intval++) {
if (isElementVisible(document['getElementById']('actionBarItem' + intval['toString']())) && intval != 36) {
turretType = intval - 16;
}
}
spawnpadType = 36;
}
;

var menuChange = document.createElement("div");
menuChange.className = "menuCard";
menuChange.id = "mainSettings";
menuChange.innerHTML = `
        <div id="simpleModal" class="modal">
            <div class="modal-content">
                <div class="modal-header">
                    <span class="closeBtn">&times;</span>
                    <h2 style="font-size: 17px;">pancakes menu</h2>
                </div>
                <div class="modal-body" style="font-size: 15px;">
                    <div class="flexControl">
                    <h2 style="font-size: 17px;">Menu</h2>
        <label type="radio" class="container">Anti Insta<input type="checkbox" id="antiinsta">
        <span class="checkmark"></span></label>
        <label type="radio" class="container">put pike on instakill<input type="checkbox" id="putpike">
        <span class="checkmark"></span></label>
                <label type="radio" class="container">erm..nothing<input type="checkbox" id="360hit">
        <span class="checkmark"></span></label>
        <label type="radio" class="container">space insta<input type="checkbox" id="spaceinsta">
        <span class="checkmark"></span></label>
                        <div class="modal-body" style="font-size: 15px;">
                    <div class="flexControl">
                    <h2 style="font-size: 25px;">Trap settings</h2>
        <label class="container">Anti-Pit-Trap?<input type="checkbox" id="antitrap">
        <span class="checkmark"></span></label>
        <label class="container">place spikes behind you if you got trapped?<input type="checkbox" id="placespike">
        <span class="checkmark"></span></label>
        <label class="container">place traps behind you if you got trapped?<input type="checkbox" id="placetrap">
        <span class="checkmark"></span></label>
         <label class="container">AutoBreak Pit-Trap?<input type="checkbox" id="autobreaktrap">
                 <span class="checkmark"></span></label>
                 <label class="container">Autoplace traps after autobreak?<input type="checkbox" id="autoplacetraps">
                 <span class="checkmark"></span></label>
                    </div>
                </div>
                <div class="modal-footer">
                </div>
            </div>
        </div>
        `
        document.body.appendChild(menuChange)
var styleItem1 = document.createElement("style");
styleItem1.type = "text/css";
styleItem1.appendChild(document.createTextNode(`
#mainSettings{
     overflow-y : scroll;
}
        .keyPressLow {
            margin-left: 10px;
            font-size: 18px;
            margin-right: 8px;
            height: 29px;
            width: 60px;
            background-color: #00F0F8FF;
            border-radius: 3.5px;
            border: none;
            text-align: center;
            color: #4A4A4A;
            border: 0.5px solid #f2f2f2;
        }
        .menuPrompt {
            font-size: 17px;
            font-family: 'Hammersmith One';
            color: #4A4A4A;
            flex: 0.2;
            text-align: center;
            margin-top: 10px;
            display: inline-block;
        }
        .modal {
            display: none;
            position: fixed;
            z-index: 1;
            left: 0;
            top: 0;
            overflow: auto;
            height: 100%;
            width: 100%;
        }
        .modal-content {
            margin: 10% auto;
            width: 40%;
            box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
            font-size: 14px;
            line-height: 1.6;
        }
        .modal-header h2,
        .modal-footer h3 {
          margin: 0;
        }
        .modal-header {
            background: rgba(0,0,0,0.5);
            padding: 15px;
            color: #fff;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
        }
        .modal-body {
            padding: 10px 20px;
            background: rgba(255,255,255,0.5);
        }
        .modal-footer {
            background: rgba(0,0,0,0.5);
            padding: 10px;
            color: #fff;
            text-align: center;
            border-bottom-left-radius: 5px;
            border-bottom-right-radius: 5px;
        }
        .closeBtn {
            color: #00c864;
            float: right;
            font-size: 30px;
            color: red;
        }
        .closeBtn:hover,
        .closeBtn:focus {
            color: #00c864;
            text-decoration: none;
            cursor: pointer;
        }
        .container {
          display: block;
          position: relative;
          padding-left: 35px;
          margin-bottom: 12px;
          cursor: pointer;
          font-size: 16px;
          -webkit-user-select: none;
          -moz-user-select: none;
          -ms-user-select: none;
          user-select: none;
        }
        .container input {
          position: absolute;
          opacity: 0;
          cursor: pointer;
          height: 0;
          width: 0;
        }
        .checkmark {
          position: absolute;
          top: 0;
          left: 0;
          height: 25px;
          width: 25px;
          background-color: black;
        }
        .container:hover input ~ .checkmark {
          background-color: #ccc;
        }
        .container input:checked ~ .checkmark {
          background-color: #00c864;
        }
        .checkmark:after {
          content: "";
          position: absolute;
          display: none;
        }
        .container input:checked ~ .checkmark:after {
          display: block;
        }
        .container .checkmark:after {
          left: 9px;
          top: 5px;
          width: 5px;
          height: 10px;
          border: solid white;
          border-width: 0 3px 3px 0;
          -webkit-transform: rotate(45deg);
          -ms-transform: rotate(45deg);
          transform: rotate(45deg);
        }
        `))
document.head.appendChild(styleItem1);

document.addEventListener('keydown', function(e) {
    if (e.keyCode == 27){
        if (modal.style.display = "none") {
            modal.style.display = "block";
        } else {
            modal.style.display = "none";
        }
    }
})

var modal = document.getElementById("simpleModal");
var closeBtn = document.getElementsByClassName('closeBtn')[0];

closeBtn.addEventListener('click', closeModal);
window.addEventListener('click', outsideClick);

function closeModal() {
    modal.style.display = 'none';
}
function outsideClick(e) {
    if (e.target == modal) {
        modal.style.display = 'none';
    }
}
var ai = document.querySelector("#antiinsta")
ai.addEventListener('change', function() {
    if (this.checked) {
        antiinsta = true;
        doNewSend(["ch", ["Pancake Anti-Insta: On"]]);
    } else {
        doNewSend(["ch", ["pancake Anti-Insta: Off"]]);
        antiinsta = false;
    }
})
var at = document.querySelector("#antitrap")

at.addEventListener('change', function() {
    if (this.checked) {
        antitrap = true;
        doNewSend(["ch", ["pancake anti-trap:on"]]);
    } else {
        antitrap = false;
        doNewSend(["ch", ["pancake anti-trap:Off"]]);
    }
})
var ps = document.querySelector("#placespike")

ps.addEventListener('change', function() {
    if (this.checked) {
        palcespikes = true;
        doNewSend(["ch", ["pancake place spike at at:on"]]);
    } else {
        palcespikes = false;
        doNewSend(["ch", ["pancake place spike at at:Off"]]);
    }
})
var pt = document.querySelector("#placetrap")

pt.addEventListener('change', function() {
    if (this.checked) {
        palcetraps = true;
        doNewSend(["ch", ["pancake place trap at at:On"]]);
    } else {
        palcetraps = false;
        doNewSend(["ch", ["pancake place trap at at:Off"]]);
    }
})
var abt = document.querySelector("#autobreaktrap")

abt.addEventListener('change', function() {
    if (this.checked) {
        autobreak = true;
        doNewSend(["ch", ["pancake autobreak:On"]]);
    } else {
        autobreak = false;
        doNewSend(["ch", ["pancake autobreak:Off"]]);
    }
})

var apt = document.querySelector("#autoplacetraps")

apt.addEventListener('change', function() {
    if (this.checked) {
        autoplacetraps = true;
        doNewSend(["ch", ["pancake autoplace traps:on"]]);
    } else {
        autoplacetraps = false;
        doNewSend(["ch", ["pancake autoplace traps:Off"]]);
    }
})

var si = document.querySelector("#spaceinsta")

si.addEventListener('change', function() {
    if (this.checked) {
        spaceinsta = true;
        doNewSend(["ch", ["pancake space insta:on"]]);
    } else {
        spaceinsta = false;
        doNewSend(["ch", ["pancake space insta:Off"]]);
    }
})

var pi = document.querySelector("#putpike")

pi.addEventListener('change', function() {
    if (this.checked) {
        pikeinsta = true;
        doNewSend(["ch", ["pancake put pike on insta:on"]]);
    } else {
        pikeinsta = false;
        doNewSend(["ch", ["pancake put pike insta:Off"]]);
    }
})

var hit = document.querySelector("#360hit")

hit.addEventListener('change', function() {
    if (this.checked) {
        hit360 = true;
        doNewSend(["ch", ["pancake 360 hit:on"]]);
    } else {
        hit360 = false;
        doNewSend(["ch", ["pancake 360 hit:Off"]]);
    }
})