MooMoo.io Full Mod Menu

Full client-side mod menu for MooMoo.io with toggleable hacks.

// ==UserScript==
// @name         MooMoo.io Full Mod Menu
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Full client-side mod menu for MooMoo.io with toggleable hacks.
// @author       me
// @match        *://*.moomoo.io/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Create mod menu UI
    const menu = document.createElement('div');
    menu.id = 'modMenu';
    menu.style = `
        position: fixed;
        top: 100px;
        right: 20px;
        width: 200px;
        background: rgba(0,0,0,0.9);
        color: white;
        font-family: monospace;
        padding: 10px;
        border: 2px solid #00ff00;
        border-radius: 8px;
        z-index: 9999;
        display: none;
    `;
    menu.innerHTML = `
        <h3 style="margin-top:0;">MooMoo.io Hacks</h3>
        <label><input type="checkbox" id="autoHeal"> Auto Heal</label><br>
        <label><input type="checkbox" id="autoHat"> Auto Hat</label><br>
        <label><input type="checkbox" id="autoWeapon"> Auto Weapon</label><br>
        <label><input type="checkbox" id="superSpeed"> Speed Boost</label><br>
        <label><input type="checkbox" id="infiniteScore"> Infinite Score</label><br>
        <label><input type="checkbox" id="spamTraps"> Trap Spam</label><br>
        <label><input type="checkbox" id="antiAFK"> Anti-AFK</label><br>
        <label><input type="checkbox" id="zoomHack"> Zoom Out</label><br>
        <label><input type="checkbox" id="revealMinimap"> Reveal Minimap</label><br>
    `;
    document.body.appendChild(menu);

    // Toggle menu with P
    document.addEventListener('keydown', function(e) {
        if (e.key.toLowerCase() === 'p') {
            menu.style.display = (menu.style.display === 'none') ? 'block' : 'none';
        }
    });

    // Utility functions
    const sendKey = (keyCode) => {
        document.dispatchEvent(new KeyboardEvent('keydown', {keyCode}));
        document.dispatchEvent(new KeyboardEvent('keyup', {keyCode}));
    };

    let lastHat = 7; // Default auto-hat index
    let lastWeapon = 1; // Default weapon

    // Main loop
    setInterval(() => {
        // Auto Heal (press "1" = food)
        if (document.getElementById('autoHeal').checked && window.health < 60) {
            sendKey(49); // keyCode for "1"
        }

        // Auto Hat (toggle best available)
        if (document.getElementById('autoHat').checked && window.myPlayer) {
            window.socket.send(JSON.stringify(["13c", lastHat])); // Hat index
        }

        // Auto Weapon
        if (document.getElementById('autoWeapon').checked && window.myPlayer) {
            window.socket.send(JSON.stringify(["2", lastWeapon]));
        }

        // Speed Boost (increases movement speed)
        if (document.getElementById('superSpeed').checked && window.myPlayer) {
            window.myPlayer.speed = 1.5;
        }

        // Infinite Score (visual only)
        if (document.getElementById('infiniteScore').checked && window.myPlayer) {
            window.myPlayer.score = 999999;
        }

        // Trap Spam (place trap constantly)
        if (document.getElementById('spamTraps').checked && window.myPlayer) {
            window.socket.send(JSON.stringify(["5", 22, true])); // Place trap
        }

        // Anti-AFK (simulates small movement)
        if (document.getElementById('antiAFK').checked) {
            window.mouseX += Math.random() - 0.5;
            window.mouseY += Math.random() - 0.5;
        }

        // Zoom Out
        if (document.getElementById('zoomHack').checked) {
            document.body.style.zoom = "60%";
        } else {
            document.body.style.zoom = "100%";
        }

        // Reveal minimap (if hidden behind fog logic)
        if (document.getElementById('revealMinimap').checked && window.miniMap) {
            window.miniMap.fog = false;
        }
    }, 100); // Loop every 100ms

})();