Penguin Client

Lots of mods

Install this script?
Author's suggested script

You may also like MooMoo.io Worthless Bots.

Install this script
// ==UserScript==
// @name         Penguin Client
// @version      1.0
// @description  Lots of mods
// @author       Joe (helped a lot by flower)
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHoAAAB6CAMAAABHh7fWAAAA0lBMVEWd5/n///8AAACX5vmh6Pn/iADS8/z6/v/F8Pux7Pqg7P72/f6j8P/c9v3o+f6m6fq87vv09PTQ0NCJytnGxsb/jACY3/CAgIDn5+eMjIza2tqm9f9wpLEbKCsRGRsIDA1Rd4A7V15HZ256s8E7OztqampHR0dPT0+3t7esrKw2T1YZGRlbW1skJCRycnL/fgAwQ0ckNTldiZSBvs1pmqQwMDCfn59MKAB7QQCUTwChVgCGSAD/9+//tXz9mkX/4s3/oVv/697/xJr/r2//u4n/zqtlHsADAAAGgklEQVRogcWbaXvbNgyASUmRLdqS7TiTneZwYidOc7tJ23Vbt/Ta//9Lo3WSBEBJsTLhS58+iPgaBEjwABlvLL0o9PvjIPA8xjwvCMZ9P4x6zdthDal+4LmJsELS/3uB35DfAD0IA4+pTF2kxgvCQfvogR9YsAo+8OvS66GjMavEFng2jlpDh0G1vbrtQdgK2vcacTO65++MDuv3tAFnVZbb0VHwSnACD+w+t6F7/WY+Bmy3bxvpFnQ02gmcwEcWw2l0f2dwAu83Rg92Nzljj6gphkCHLYETOBHqONpvkSzZ+BhH0e24WWGjDsfQ45bJkj2uh26fjLMh+i3IKBug34aMsU102xGmsM1YM9DtjiqD7dvQbc4kCDuk0YM3JUv2gESP3pbM2IhCv12I5aKFmoKO6pKFGB6JOJ4mEsfiaDgUddkRhu7V6m4xZPHz8dnm5HSxcKQsFqcnH86fVtNY1OKPegi6RncLEa/ONqcOJic3T89xNV3p8gJd2d2Se3yOYwv8chWLCnrZ5QW6Yu0pxPNyYeVm9LOpHe4GJto+mYij1aYGN5XN6sgGLyaWHG0FD59PaoO38mFldbqOts3dw+lNI/BWbqZD2mxfQ3u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ehZ6YA+vBLFYcoB2vD30ugf6B8UaHRRlh1e4Ud2hbvxpMhfMrMff+J6vqCGNFOO7IiDs5UVzV/2JPzx8RehztILNq5YeVBJHM9mbArN+b8/v/36TmqTBfESJZfHs9ShdMqm0XbZovGTQvVQmjqKF9PFTmjqPFw5iicvIMR0swOa2nBoFxDktYtgS3xwVcuavPTRrl0sl02Crl+yShSTty76ZZPlis1auEVJz1bokSOzf20Xi27QoDo0Ed9SIwcuFq3Xqa47bgK3FkLC69SKS2SX9Wt2+8C3V6ohl8hVV+euW6Muthf1K0o/savzGgUDLhvb6JI7qqyDRAsGapVJSNv7IdL1Elunppgok6hbHJJWZPd9PwzDKAx9vz8eMbde2SdVHNKoJMZVpfZXZElMl4VAHZY/dVn01WWpW5cFfl2WNXZZzNllCWuXhbtdlit3WaTdZWk677Agn3f5DKHLxxe8wycnW+nsoc1WOntelFje1aOqrXT2lGwrnT2gS+kdPRtMpavHkiW/nSei/wE8XHXOIxS17AAAAABJRU5ErkJggg==
// @match        *://*.moomoo.io/*
// @match        *://*.sandbox.moomoo.io/*
// @require      https://greasyfork.org/scripts/456235-moomoo-js/code/MooMoojs.js?version=1144167
// @run-at       document-end
// @grant        none
// @namespace https://greasyfork.org/users/889950
// ==/UserScript==
/*
AutoInsta with Musket/Spike
AutoTrap/Spike Placer
Quad Spike, trap, or turret
Triple mills
MiniBoostSpike/Regular BoostSpike
Helpful menu information
Hat hotkeys
Normal hotkeys
Customizable autoheal

*/
// Setup info
const MooMoo = (function MooMooJS_beta() {})[69];
let activePlayerManager = MooMoo.ActivePlayerManager;
let players = activePlayerManager.players;

// Instakill:

var autoinsta = false;
var instaType = 1

function Equip(id, type) {
    MooMoo.sendPacket("13c" , 0, id, type)
}
var isReloaded = true

function instaMusket1() {
    let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
    MooMoo.sendPacket("c", 0, null)
    isReloaded = false
    let primary = MooMoo.myPlayer.inventory.primary;
    MooMoo.sendPacket("13c" , 0, 7, 0)
    MooMoo.sendPacket("13c", 0, 0, 1)
    MooMoo.sendPacket("13c", 0, 21, 1)
    MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.primary, true);
    MooMoo.myPlayer.hit(nearestEnemyAngle);
}

function instaMusket2() {
    let secondary = MooMoo.myPlayer.inventory.secondary;
    setTimeout(() => {
        MooMoo.sendPacket("13c", 0, 53, 0)
        MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.secondary, true);
        let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
        MooMoo.myPlayer.hit(nearestEnemyAngle);
    }, 75);
    setTimeout(() => {
        MooMoo.sendPacket("13c", 0, 6, 0)
    }, 150)
}

function instaMusketReload() {
    let primary = MooMoo.myPlayer.inventory.primary;
    let secondary = MooMoo.myPlayer.inventory.secondary;
    setTimeout(() => {
        MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.secondary, true);
    }, 300);
    setTimeout(() => {
        MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.primary, true);
    }, 2500);
    setTimeout(() => {
        MooMoo.sendPacket("13c", 0, 12, 0)
        MooMoo.sendPacket("13c", 0, 0, 1)
        MooMoo.sendPacket("13c", 0, 11, 1)
    }, 3500);
    setTimeout(() => {
        isReloaded = true
    }, 4000)
}

function instaSpike1() {
    MooMoo.sendPacket("c", 0, null)
    isReloaded = false
    let primary = MooMoo.myPlayer.inventory.primary;
    MooMoo.sendPacket("13c" , 0, 7, 0)
    MooMoo.sendPacket("13c", 0, 0, 1)
    MooMoo.sendPacket("13c", 0, 21, 1)
    MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.primary, true);
    let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
    MooMoo.myPlayer.hit(nearestEnemyAngle);
}

function instaSpike2() {
    setTimeout(() => {
        MooMoo.sendPacket("13c", 0, 53, 0)
        let spike = MooMoo.myPlayer.inventory.spike;
        let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
        MooMoo.myPlayer.place(spike, nearestEnemyAngle + anglechange(35));
        MooMoo.myPlayer.place(spike, nearestEnemyAngle + anglechange(315));
    }, 100);
    setTimeout(() => {
        MooMoo.sendPacket("13c", 0, 6, 0)
    }, 150)
}

function instaSpikeReload() {
    let primary = MooMoo.myPlayer.inventory.primary;
    setTimeout(() => {
        MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.primary, true);
    }, 200);
    setTimeout(() => {
        MooMoo.sendPacket("13c" , 0, 7, 0)
        MooMoo.sendPacket("13c", 0, 0, 1)
        MooMoo.sendPacket("13c", 0, 21, 1)
    }, 500);
    setTimeout(() => {
        isReloaded = true
    }, 1000)
}

// Normal hotkeys

function HoldSpike() {
    let myPlayer = MooMoo.myPlayer;
    MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.spike, false)
}
function HoldTrap() {
    let myPlayer = MooMoo.myPlayer;
    MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.trap, false)
}
function HoldTeleport() {
    let myPlayer = MooMoo.myPlayer;
    MooMoo.sendPacket("5", MooMoo.myPlayer.inventory.turret, false)
}
function anglechange(angle) {
    return angle * 0.01745329251;
}
// Hacked hotkeys
function QuadSpike() {
    let myPlayer = MooMoo.myPlayer;
    let spike = MooMoo.myPlayer.inventory.spike;
    MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(0));
    MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(90));
    MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(180));
    MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(270));
}

function QuadBoost() {
    let myPlayer = MooMoo.myPlayer;
    let Boost = MooMoo.myPlayer.inventory.boostPad;
    MooMoo.myPlayer.place(Boost, myPlayer.dir + anglechange(0));
    MooMoo.myPlayer.place(Boost, myPlayer.dir + anglechange(90));
    MooMoo.myPlayer.place(Boost, myPlayer.dir + anglechange(180));
    MooMoo.myPlayer.place(Boost, myPlayer.dir + anglechange(270));
}
var millDir = "null"
function TripMill() {
    let myPlayer = MooMoo.myPlayer;
    let mill = MooMoo.myPlayer.inventory.mill
    if (millDir == "A") {
        MooMoo.myPlayer.place(mill, anglechange(0));
        MooMoo.myPlayer.place(mill, anglechange(90));
        MooMoo.myPlayer.place(mill, anglechange(270));
    }
    if (millDir == "S") {
        MooMoo.myPlayer.place(mill, anglechange(0));
        MooMoo.myPlayer.place(mill, anglechange(180));
        MooMoo.myPlayer.place(mill, anglechange(270));
    }
    if (millDir == "W") {
        MooMoo.myPlayer.place(mill, anglechange(0));
        MooMoo.myPlayer.place(mill, anglechange(90));
        MooMoo.myPlayer.place(mill, anglechange(180));
    }
    if (millDir == "D") {
        MooMoo.myPlayer.place(mill, anglechange(90));
        MooMoo.myPlayer.place(mill, anglechange(180));
        MooMoo.myPlayer.place(mill, anglechange(270));
    }
}

function QuadTurret() {
    let myPlayer = MooMoo.myPlayer;
    let Turret = MooMoo.myPlayer.inventory.turret;
    MooMoo.myPlayer.place(Turret, myPlayer.dir + anglechange(0));
    MooMoo.myPlayer.place(Turret, myPlayer.dir + anglechange(90));
    MooMoo.myPlayer.place(Turret, myPlayer.dir + anglechange(180));
    MooMoo.myPlayer.place(Turret, myPlayer.dir + anglechange(270));
}

function MiniBoostSpike() {
    let myPlayer = MooMoo.myPlayer;
    let spike = MooMoo.myPlayer.inventory.spike;
    let Boost = MooMoo.myPlayer.inventory.boostPad;
    let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
    let nearestEnemyDistance = activePlayerManager.getClosestEnemyDistance();
    MooMoo.myPlayer.place(Boost, nearestEnemyAngle, anglechange(0));
    setTimeout(() => {
        MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(0));
        MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(90));
        MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(180));
        MooMoo.myPlayer.place(spike, myPlayer.dir + anglechange(270));
    }, nearestEnemyDistance);
}

function BoostSpike() {
    let myPlayer = MooMoo.myPlayer;
    let spike = MooMoo.myPlayer.inventory.spike;
    let Boost = MooMoo.myPlayer.inventory.boostPad;
    let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
    MooMoo.myPlayer.place(Boost, nearestEnemyAngle + anglechange(0));
    MooMoo.myPlayer.place(spike, nearestEnemyAngle + anglechange(90));
    MooMoo.myPlayer.place(spike, nearestEnemyAngle + anglechange(270));
}

// AutoFighter
var autofight = false;
var Traper = "trap";
var autoReplacer = false;
var buildsNearPlayer = []

function automaticFighter() {
    let nearestEnemyDistance = activePlayerManager.getClosestEnemyDistance();
    let myPlayer = MooMoo.myPlayer;
    let trap = MooMoo.myPlayer.inventory.boostPad;
    let spike = MooMoo.myPlayer.inventory.spike;
    setTimeout(() => {
        if (nearestEnemyDistance < 300 && nearestEnemyDistance !== null) {
            if (Traper == "spike") {
                let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
                MooMoo.myPlayer.place(spike, nearestEnemyAngle);
            }
        }
        if (nearestEnemyDistance < 200 && nearestEnemyDistance !== null) {
            if (Traper == "trap") {
                let nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
                MooMoo.myPlayer.place(trap, nearestEnemyAngle);
            }
        }
    }, 200)
}

// Visuals

var AUTOHEAL_SPEED = 100 // make lower if you clown too fast
var autoheal_on = true

const setStyles = element => {
    const styles = {
        position: "absolute"
        , top: "0px"
        , left: "0px"
        , color: "cyan"
        , fontFamily: "times"
        , fontSize: "20px"
    };

    Object.entries(styles)
        .forEach(([key, value]) => {
        element.style[key] = value;
    });
};
const displayGameInfo = () => {
    let myPlayer = MooMoo.myPlayer
    const gameInfoElement = document.createElement("div");
    setStyles(gameInfoElement);
    gameInfoElement.id = "playerPosition";
    document.body.appendChild(gameInfoElement);
    const GameUI = document.querySelectorAll("#chatBox, #upgradeHolder, #upgradeCounter, #allianceButton, #storeButton, #storeTab, #ageBar, #topInfoHolder, #resDisplay, #notificationDisplay, #chatButton, #mapDisplay, #storeHolder, #allianceHolder, #ageText");
    const mainMenuName = document.getElementById("gameName");
    const pingDisplay = document.getElementById("pingDisplay");
    const mainMenu = document.getElementById("mainMenu");
    const informationCard = document.getElementById("guideCard");
    const menuCard = document.getElementById("setupCard");
    const ad = document.getElementById("promoImgHolder");
    const death = document.getElementById("diedText");
    GameUI.forEach(element => {
        if (element.id !== "upgradeHolder") {
            if (element.id !== "upgradeCounter") {
                if (element.id !== "ageText") {
                    if (element.id !== "storeHolder") {
                        element.style.backgroundColor = "DodgerBlue";
                        element.style.color = "LightCyan";
                    }
                }
            }
        }
        if (element.id == "topInfoHolder" ) {
            element.style.backgroundImage = "url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQEA8QEBAVEBAQEA8PDw8PEA8PDw8QFREWFhURFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQFi0fHx0tLS0tLSstLS0tKystLSstLS0rLS0tNzctLTctLS03LSstKysrNy0tKysrKystKysrK//AABEIANgA6gMBIgACEQEDEQH/xAAcAAABBAMBAAAAAAAAAAAAAAAAAQMEBgIFBwj/xAA5EAACAgEBBgQDBgMJAQAAAAAAAQIDEQQFBhIhMVEHQWGREyJSFBVTcYGhFrHBFyMyQkNictHwM//EABoBAQEBAQEBAQAAAAAAAAAAAAABAgMEBQb/xAAiEQEBAQEAAQQDAAMAAAAAAAAAARECAwQSITETQVEUIkL/2gAMAwEAAhEDEQA/AO0gAAAAAAAAAAAAAAAAADV2phD/ABSUfzaQDoGqu3h0setsf0Yx/Fej/FRcTY3gGpq3i0sulsfc2FOqrn/hmn+TIungAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG9RfGuLlJ4iubbAcNZtTblGnTc5LPZPmUfezxA4c10PC6cXmznGu21ZbJuUm89zWM2ug7e8QZvMaflXfzKPr94L7XmVjf6s1PxOLzHq6slnwywnrJvzYn2ifdkyGlRk9KjemI1WtmvNm52dvDbXjE37mrnpxt1majpmx9/ZLCs5ly2ZvHRfjEkn2OAJtEvR7TnW8psntWdPRkZJ9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F7Mp/DQfddP4aEAA+6aPw0J900fhoUAE+6KPw0J9z0fhoAAT7m0/4aMlsij6EAAL910/QhVsyn6EAAZfd1X0IPu+r6EAAKtDV9CM46WC6RQAA4q12QuAABQAAP/9k=')";

        }
        if (element.id == "upgradeCounter") {
            element.style.color = "blue";
        }
        if (element.id == "ageText") {
            element.style.color = "blue";
        }
    });
    pingDisplay.style.color = "cyan";
    mainMenuName.textContent = "Pengiun Client";
    mainMenuName.style.color = "cyan";
    mainMenuName.style.fontSize = "150px";
    mainMenu.style.backgroundImage = "url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBYWFRgVFhUYGBgaHRocGRgcGhwcHBgcHBgcGRoYGBocIS4lHCErIRwaJjgmKy8xNTU1GiQ7QDs0Py40NTEBDAwMEA8QHxISHjQhJCsxNDQ0PzE0NDQ0PzQ0NDQ0NDQxNDE0NDQ0NDQ1MTQ0NDQ0MTQ1NDQ3NDQ0NjQ3NDQ0NP/AABEIANUA7QMBIgACEQEDEQH/xAAcAAACAgMBAQAAAAAAAAAAAAAAAQIHAwUGBAj/xAA9EAACAAQDBQYFAgUDBAMAAAABAgAREiEDMUEEBSJRYQYTMnGBoQdCYpHRFMEjUnKx8HOCkhWy4fEzQ2P/xAAZAQEAAwEBAAAAAAAAAAAAAAAAAQIDBAX/xAAmEQEBAQEAAQUAAgEFAQAAAAAAAQIRAwQSITFBUWFxIlKBkcEU/9oADAMBAAIRAxEAPwC32YMJDOEhpsYClNxAoqubQEQpnVpn6RJ+LLSFV8umUM8OV5wDVgBSc4SLTcwBJ8X+WhKarHzgB1qMxEmYEUjOIs1Nh5wylPF/l4AQ056xEqZ1aZ+kSAqztKFV8umUA3NVhDVgokc4TCm4vAEquYBIhUzOUDiq4gDVWMBamwvrASLCVOuUJOHPWI4jKoqZgNbkAe8aZ+1OzcRfFVAk5kkAWCta5nY5dDOUBumUk1DKG5qsPOOB274qbIhpww2LeVgVAF5sHAYN6Q9h+KGyGq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MCKRnEWamw87wysuLX8wAhpz1hFTOrTOGBVnpygrvTplADmqwhqwUSOcJhTce8CpVcwEUQqZmJOtVx5QK1VjCZqbDzvAYsXZsNhSyIxyuoP7R5U3Ls6tUcDDnKQNANuUbApIVa5wl4s9OUE9Y8PZlW6Kqr0AH9oyuarDzgLSNOn5gZabjyvBAVqRIwlUg1HKGFqufaEGqscvxANxVlpDqEqdcoixpy15w6LVa5wCQU3MDKWMxlApqsdOUDPTwiAkzBhIQkamxgZKbiBVqufK0BEIQatM45T4i7lbaNnGLgAnaNnNeHSOJpEEqsszYEeXWOsDzNOmUDcOWvPpAV32Z3pt+3rguuP3K4bldoFCgu6N4FuSFZTeYsRaLD7g9I8ewbow8N8XFQUtjMGeWRKqFBA0sP7x7e/PIQCwbm94MaxtaHBATPhnrLOIYWs7w4ICLm8vKJ41ha14IIAwBMXvEEN5ecEEA8XSVomPDPWWcEEBDAuTO8LGsbWgggMmMJC1oWBcXvBBAQHilpPKJYukrQQQEkyiGAZm97QQQCx7G1oyPYfaCCAjgXnO8RPilpPKCCAli5CVvKJYNxeCCAx4Nze8PGsbWgggJt4Z6yziGFrO+UOCAix4paTEZ5DlBBAf/Z')";
    informationCard.style.backgroundColor = "skyblue";
    menuCard.style.backgroundColor = "darkblue";
    ad.remove();
    death.textContent = "Don't give up!";
    death.style.color = "aqua";
    const updateGameInfo = () => {
        var nearestEnemyDistance = activePlayerManager.getClosestEnemyDistance();
        var nearestEnemyAngle = activePlayerManager.getClosestEnemyAngle();
        document.getElementById("playerPosition")
            .innerText = `Auto_Placer: ${(autofight)} ~ 'O'
            Auto_RePlacer: ${(autoReplacer)} ~ ']'
        Spike/Trap Placer: ${(Traper)} ~ 'ArrowLeft'
        -------------------------------------------------------
        Anti_Insta: ${(isHeal)} ~ Hold Left Click
        Auto_heal: ${(autoheal_on)} ~ '9'
        Auto_heal Delay: ${(AUTOHEAL_SPEED)} MS ~ '-'/'='
        -------------------------------------------------------
        Insta_Reload: ${(isReloaded)}
        Auto_insta: ${(autoinsta)} ~ Key: [
        Insta_Type: ${(instaType)} ~ Key: BackQuote;
        -------------------------------------------------------
        Coords: ${(Math.round(MooMoo.myPlayer.x))}, ${(Math.round(MooMoo.myPlayer.y))}
        Player2Enemy_Distance: ${(Math.round(nearestEnemyDistance))}
        Player2Enemy_Angle: ${(Math.round(nearestEnemyAngle))}`;
    };

    setInterval(updateGameInfo, 10);
};
// Item Debuger

displayGameInfo();
MooMoo.addEventListener("loadGameObject", (data) => {
    let myPlayer = MooMoo.myPlayer
    let Data = data[0]
    let Build_sid = Data[0]
    let Build_X = Data[1]
    let Build_Y = Data[2]
    let Build_Dir = Data[3]
    let Build_Scale = Data[4]
    let Build_type = Data[5]
    let Build_ID_type = Data[6]
    let info = [`data:`, Build_sid, Build_X, Build_Y]
    let PlayerBuild_D = MooMoo.UTILS.getDistanceBetweenTwoPoints(MooMoo.myPlayer.x, MooMoo.myPlayer.y, Build_X, Build_Y);
    if (PlayerBuild_D < 125) {
        buildsNearPlayer.push(info)
    }
    if (Build_type == null) {
        console.log(`BuildINFO:
    SID: ${(Build_sid)} |~| ID: ${(Build_ID_type)}
    X_POS: ${(Build_X)} |~| Y_POS: ${(Build_Y)} |~| Direction: ${(Build_Dir)}
    Scale: ${(Build_Scale)} |~| Type: ${(Build_type)}`)
        if (Build_ID_type == 15 || Build_ID_type == 16) {
            console.log(`PitTrap/Boost Type`)
        }
        if (Build_ID_type == 6 || Build_ID_type == 7 || Build_ID_type == 8 || Build_ID_type == 9) {
            console.log(`Spike Type`)
        }
        if (Build_ID_type == 10 || Build_ID_type == 11 || Build_ID_type == 12) {
            console.log(`Mill Type`)
        }
        if (Build_ID_type == 17 || Build_ID_type == 18 || Build_ID_type == 19 || Build_ID_type == 20 || Build_ID_type == 21 || Build_ID_type == 22) {
            console.log(`Turret Type`)
        }
        if (Build_ID_type == 3 || Build_ID_type == 4 || Build_ID_type == 5) {
            console.log(`Wall Type`)
        }
        if (Build_ID_type == 13 || Build_ID_type == 14) {
            console.log(`Mine Type`)
        }
    }
})
MooMoo.addEventListener("killObject", (data) => {
    let sid = data[0]
    console.log(sid)
    console.log(buildsNearPlayer)
    if (autoReplacer == true) {
    for (let i = 0; i < buildsNearPlayer.length; i++) {
        for (let j = 0; j < buildsNearPlayer[i].length; j++) {
            if (buildsNearPlayer[i][j] === sid) {
                let BuildX = buildsNearPlayer[i][1]
                let BuildY = buildsNearPlayer[i][2]
                const buildAngle = Math.atan2(MooMoo.myPlayer.y - BuildY.y, MooMoo.myPlayer.x - BuildX.x)
                let myPlayer = MooMoo.myPlayer
                if (Traper == "spike") {
                    let spike = MooMoo.myPlayer.inventory.spike
                    MooMoo.myPlayer.place(spike, buildAngle);
                }
                if (Traper == "trap") {
                    let trap = MooMoo.myPlayer.inventory.trap
                    MooMoo.myPlayer.place(trap, buildAngle);
                }
                buildsNearPlayer.splice(i, i+1)
                break;
            }
        }
    }
    }
});
// AutoFight/insta
MooMoo.addEventListener("updatePlayers", (data) => {
    let nearestEnemyDistance = activePlayerManager.getClosestEnemyDistance();
    if (nearestEnemyDistance < 350) {
        if (autofight == true) {
            automaticFighter();
        }
    }
    if (autoinsta == true) {
        if (isReloaded == true) {
            if (instaType == 1 && nearestEnemyDistance < 200) {
                if (nearestEnemyDistance !== null) {
                    doAllInsta();
                }
            }
            if (instaType == 2 && nearestEnemyDistance < 150) {
                if (nearestEnemyDistance !== null) {
                    doAllInsta();
                }
            }
        }
    };
});
// Insta
function doAllInsta() {
    if (instaType == 1) {
        instaMusket1();
        instaMusket2();
        instaMusketReload();
    }
    if (instaType == 2) {
        instaSpike1();
        instaSpike2();
        instaSpikeReload();
    }
}
document.addEventListener('keydown', function (e) {
    // Normal hotkeys stuff
    if (e.keyCode == 86 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Space for Quad Spike
        HoldSpike();
    }
    if (e.keyCode == 70 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Space for Quad Spike
        HoldTrap();
    }
    if (e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Space for Quad Spike
        HoldTeleport();
    }
    // Hack hotkeys stuff
    if (e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Space for Quad Spike
        QuadSpike();
    }
    if (e.keyCode == 73 && document.activeElement.id.toLowerCase() !== 'chatbox') { // I for Quad Boost
        QuadBoost();
    }
    if (e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') { // L for Quad Turret
        QuadTurret();
    }
    if (e.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Y for boost spike
        MiniBoostSpike();
    }
    if (e.keyCode == 78 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Y for boost spike
        TripMill();
    }
    // Autoplacer stuff
    if (e.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox') { // O for spike toggle
        if (autofight == false) {
            autofight = true;
        } else {
            autofight = false;
        }
    }
        if (e.keyCode == 221 && document.activeElement.id.toLowerCase() !== 'chatbox') { // ] for spike toggle
        if (autoReplacer == false) {
            autoReplacer = true;
        } else {
            autoReplacer = false;
        }
    }
    if (e.keyCode == 37 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Left arrow for spike/trap switch
        if (Traper == "trap") {
            Traper = "spike"
        } else {
            Traper = "trap"
        }
    }
    // Information
    if (e.keyCode == 38 && document.activeElement.id.toLowerCase() !== 'chatbox') { // "UpArrow" to toggle menu
        if (document.getElementById('playerPosition')
            .hidden == true) {
            document.getElementById('playerPosition')
                .hidden = false
        } else {
            document.getElementById('playerPosition')
                .hidden = true
        }
    }
    // Autoheal stuff
    if (e.keyCode == 187 && document.activeElement.id.toLowerCase() !== 'chatbox') { // "=" to increase autoheal speed
        AUTOHEAL_SPEED += 5
    }
    if (e.keyCode == 189 && document.activeElement.id.toLowerCase() !== 'chatbox') { // "-" to lower autoheal speed
        AUTOHEAL_SPEED -= 5
    }
    if (e.keyCode == 48 && document.activeElement.id.toLowerCase() !== 'chatbox') { // "0" to reset autoheal speed
        AUTOHEAL_SPEED = 100
    }
    if (e.keyCode == 57 && document.activeElement.id.toLowerCase() !== 'chatbox') { // "9" to toggle autoheal
        if (autoheal_on == true) {
            autoheal_on = false
        } else {
            autoheal_on = true
        }
    }
    // Insta stuff
    if (e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') { // R for instakill
        if (isReloaded == true) {
            doAllInsta();
        }
    }
    if (e.keyCode == 219 && document.activeElement.id.toLowerCase() !== 'chatbox') {
        if (autoinsta == false) {
            autoinsta = true
        } else {
            autoinsta = false
        }
    }
    if (e.keyCode == 220 && document.activeElement.id.toLowerCase() !== 'chatbox') {
        if (instaType == 1) {
            instaType = 2
        } else {
            instaType = 1
        }
    }
    // Mill turners
    if (e.keyCode == 65 && document.activeElement.id.toLowerCase() !== 'chatbox') {
        millDir = "A"
    }
    if (e.keyCode == 68 && document.activeElement.id.toLowerCase() !== 'chatbox') {
        millDir = "D"
    }
    if (e.keyCode == 83 && document.activeElement.id.toLowerCase() !== 'chatbox') {
        millDir = "S"
    }
    if (e.keyCode == 87 && document.activeElement.id.toLowerCase() !== 'chatbox') {
        millDir = "W"
    }
    // Hat hotkeys stuff
    if (e.keyCode == 66 && document.activeElement.id.toLowerCase() !== 'chatbox') { // B for Solider + Corrupt X Wings
        Equip(6, 0);
        Equip(0, 1)
        Equip(21, 1);
    }
    if (e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') { // U for uneuip hat + Equip Snowball
        Equip(0, 0);
        Equip(0, 1)
    }
    if (e.keyCode == 75 && document.activeElement.id.toLowerCase() !== 'chatbox') { // K for Turret gear + Corrupt X Wings
        Equip(53, 0);
        Equip(0, 1)
        Equip(21, 1);
    }
    if (e.keyCode == 16 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Shift for booster hat + Monkey tail
        Equip(12, 0);
        Equip(0, 1)
        Equip(11, 1);
    }
    if (e.keyCode == 188 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Comma for snow + monkey tail
        Equip(15, 0);
        Equip(0, 1)
        Equip(11, 1);
    }
    if (e.keyCode == 190 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Period for flipper + monkey tail
        Equip(31, 0);
        Equip(0, 1)
        Equip(11, 1);
    }
    if (e.keyCode == 90 && document.activeElement.id.toLowerCase() !== 'chatbox') { // Z for tank gear + Corrupt X Wings
        Equip(40, 0);
        Equip(0, 1)
        Equip(21, 1);
    }
    if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox') { // T for bull helmet + Blood Wings
        Equip(7, 0);
        Equip(0, 1)
        Equip(18, 1);
    }
});
let isGKeyDown = false;
let isHeal = false;
// Boost spike stuff
document.addEventListener("keydown", (event) => {
    if (event.code === "KeyG" && document.activeElement.id.toLowerCase() !== 'chatbox') {
        isGKeyDown = true;
    }
});

document.addEventListener("keyup", (event) => {
    if (event.code === "KeyG" && document.activeElement.id.toLowerCase() !== 'chatbox') {
        isGKeyDown = false;
    }
});
setInterval(() => {
    if (isGKeyDown) {
        BoostSpike();
    }
}, 150);
// QHolder stuff
document.addEventListener("mousedown", function(event) {
    if (event.button === 2) { // check if the right mouse button is pressed
        var intervalID = setInterval(function() {
            isHeal = true;
            console.log("Right mouse button is still being held down");
        }, 50);

        document.addEventListener("mouseup", function handler(event) {
            if (event.button === 2) { // check if the right mouse button is released
                clearInterval(intervalID); // stop the continuous execution
                document.removeEventListener("mouseup", handler); // remove the handler
                isHeal = false;
                setTimeout(() => {
                    Equip(7, 0)
                }, 100)
                setTimeout(() => {
                    Equip(6, 0)
                }, 4000)
            }
        });
    }
});
// Healer
MooMoo.addEventListener("updatehealth", (data) => {
    let sid = data[0]
    let health = data[1]
    if (MooMoo.myPlayer.sid === sid && health < 100) {
        let food = MooMoo.myPlayer.inventory.food;
        if (isHeal == true) {
            MooMoo.myPlayer.place(food)
        }
        if (autoheal_on == true) {
            setTimeout(() => {
                MooMoo.myPlayer.place(food)
            }, AUTOHEAL_SPEED)
        }
    }
})