Minefun.io Ultimate Client [VIP]

Advanced Mod Menu for Minefun. Press ',' to open. Features: Kill Aura, ESP, Speed, and more.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Minefun.io Ultimate Client [VIP]
// @namespace    http://tampermonkey.net/
// @version      3.0.0
// @description  Advanced Mod Menu for Minefun. Press ',' to open. Features: Kill Aura, ESP, Speed, and more.
// @author       Minefun Modder
// @match        *://*.minefun.io/*
// @match        *://minefun.io/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // ==========================================
    // CORE SYSTEM & SETTINGS
    // ==========================================
    const Client = {
        name: "MINEFUN VIP CLIENT",
        version: "v3.0.0",
        prefix: "[VIP]",
        menuOpen: false,
        toggleKey: ',', // Dấu phẩy để mở menu
        modules: [],
        categories: ['Combat', 'Movement', 'Visuals', 'Player', 'World'],
        hooks: {
            ws: null,
            send: null,
            onmessage: null
        },
        player: {
            x: 0, y: 0, z: 0,
            id: null,
            health: 100
        },
        entities: new Map()
    };

    // ==========================================
    // MODULE REGISTRY SYSTEM
    // ==========================================
    class Module {
        constructor(name, category, description, defaultValue = false) {
            this.name = name;
            this.category = category;
            this.description = description;
            this.enabled = defaultValue;
            Client.modules.push(this);
        }

        toggle() {
            this.enabled = !this.enabled;
            this.onToggle();
            saveConfig();
        }

        onToggle() {
            // Override in specific modules
        }

        onTick() {}
        onRender() {}
        onPacketSend(packet) { return packet; }
        onPacketReceive(packet) { return packet; }
    }

    // --- COMBAT MODULES ---
    const KillAura = new Module("Kill Aura", "Combat", "Automatically attacks entities around you.");
    KillAura.onTick = function() {
        if (!this.enabled) return;
        Client.entities.forEach(entity => {
            if (entity.distance < 5.0 && entity.isAlive) {
                sendPacket({ type: "attack", targetId: entity.id });
            }
        });
    };

    const Aimbot = new Module("Aimbot", "Combat", "Snaps your camera to the nearest enemy.");
    const AutoArmor = new Module("Auto Armor", "Combat", "Automatically equips the best armor in inventory.");
    const AntiKnockback = new Module("Velocity", "Combat", "Prevents taking knockback from hits.", true);
    const Criticals = new Module("Criticals", "Combat", "Forces critical hits on every attack.");
    const Reach = new Module("Reach", "Combat", "Extends your attack range up to 6 blocks.");

    // --- MOVEMENT MODULES ---
    const Speed = new Module("Speed Hack", "Movement", "Increases movement speed significantly.");
    Speed.onTick = function() {
        if (!this.enabled) return;
        // Logic tăng tốc độ gửi packet di chuyển
    };

    const Fly = new Module("Fly", "Movement", "Allows you to fly freely in survival.");
    const Jesus = new Module("Jesus", "Movement", "Walk on water and lava.");
    const Spider = new Module("Spider", "Movement", "Climb walls like a spider.");
    const Step = new Module("Step", "Movement", "Instantly step up full blocks.");
    const NoFall = new Module("No Fall", "Movement", "Prevents taking fall damage.");
    const Phase = new Module("Phase", "Movement", "Walk through solid blocks (Wallhack movement).");

    // --- VISUAL MODULES ---
    const ESP = new Module("ESP / Wallhack", "Visuals", "See players and entities through walls.");
    const Tracers = new Module("Tracers", "Visuals", "Draws lines to other players.");
    const Fullbright = new Module("Fullbright", "Visuals", "Makes everything completely bright.");
    const Chams = new Module("Chams", "Visuals", "Renders players with bright colors visible anywhere.");
    const XRay = new Module("X-Ray", "Visuals", "Hides useless blocks to show ores and bases.");

    // --- PLAYER MODULES ---
    const AutoHeal = new Module("Auto Heal", "Player", "Automatically consumes food/potions when low HP.");
    const FastBreak = new Module("Fast Break", "Player", "Break blocks instantly.");
    const Invincibility = new Module("God Mode", "Player", "Exploits server sync to prevent taking damage.");
    const AutoRespawn = new Module("Auto Respawn", "Player", "Instantly respawns upon death.");
    const Top1InstaWin = new Module("1s Top 1 Mode", "Player", "Sends massive score packets (Depends on mode).");

    // --- WORLD MODULES ---
    const Nuke = new Module("Nuke", "World", "Breaks all blocks around you instantly.");
    const AutoBuild = new Module("Auto Build", "World", "Scaffolds blocks under you as you walk.");
    const WeatherClear = new Module("Clear Weather", "World", "Forces weather to be sunny client-side.");

    // ==========================================
    // CONFIGURATION SAVING
    // ==========================================
    function saveConfig() {
        let config = {};
        Client.modules.forEach(m => {
            config[m.name] = m.enabled;
        });
        localStorage.setItem("MinefunClient_Config", JSON.stringify(config));
    }

    function loadConfig() {
        let saved = localStorage.getItem("MinefunClient_Config");
        if (saved) {
            try {
                let config = JSON.parse(saved);
                Client.modules.forEach(m => {
                    if (config[m.name] !== undefined) {
                        m.enabled = config[m.name];
                    }
                });
            } catch (e) {}
        }
    }

    // ==========================================
    // ADVANCED UI INJECTION (CSS & HTML)
    // ==========================================
    const uiStyles = `
        @import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap');
        
        #vip-client-gui {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 700px;
            height: 480px;
            background: rgba(15, 15, 20, 0.95);
            border: 2px solid #ff0055;
            border-radius: 12px;
            box-shadow: 0 0 25px rgba(255, 0, 85, 0.4), inset 0 0 10px rgba(0,0,0,0.8);
            z-index: 999999;
            font-family: 'Rajdhani', sans-serif;
            color: #fff;
            display: none;
            user-select: none;
            overflow: hidden;
            backdrop-filter: blur(5px);
        }
        #vip-header {
            background: linear-gradient(90deg, #ff0055 0%, #aa00ff 100%);
            padding: 15px;
            text-align: center;
            font-size: 24px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            border-bottom: 2px solid rgba(255,255,255,0.1);
            letter-spacing: 2px;
        }
        #vip-body {
            display: flex;
            height: calc(100% - 60px);
        }
        #vip-sidebar {
            width: 180px;
            background: rgba(0, 0, 0, 0.4);
            border-right: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-direction: column;
            padding: 10px 0;
        }
        .vip-tab {
            padding: 15px 20px;
            cursor: pointer;
            font-size: 18px;
            transition: 0.3s all;
            border-left: 3px solid transparent;
        }
        .vip-tab:hover {
            background: rgba(255, 0, 85, 0.2);
            padding-left: 25px;
        }
        .vip-tab.active {
            background: rgba(255, 0, 85, 0.3);
            border-left: 3px solid #ff0055;
            color: #ff0055;
            text-shadow: 0 0 10px #ff0055;
        }
        #vip-content {
            flex-grow: 1;
            padding: 20px;
            overflow-y: auto;
        }
        .module-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            display: none;
        }
        .module-grid.active {
            display: grid;
        }
        .module-btn {
            background: rgba(30, 30, 40, 0.8);
            border: 1px solid rgba(255,255,255,0.1);
            padding: 15px;
            border-radius: 8px;
            cursor: pointer;
            transition: 0.2s;
            position: relative;
            overflow: hidden;
        }
        .module-btn:hover {
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        .module-btn.enabled {
            background: rgba(255, 0, 85, 0.15);
            border: 1px solid #ff0055;
            box-shadow: 0 0 15px rgba(255, 0, 85, 0.2);
        }
        .module-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 5px;
            color: #aaa;
        }
        .module-btn.enabled .module-title {
            color: #ff0055;
            text-shadow: 0 0 5px rgba(255, 0, 85, 0.5);
        }
        .module-desc {
            font-size: 13px;
            color: #888;
            line-height: 1.2;
        }
        .status-indicator {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #444;
        }
        .module-btn.enabled .status-indicator {
            background: #ff0055;
            box-shadow: 0 0 8px #ff0055;
        }
        
        /* Scrollbar custom */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #ff0055; border-radius: 3px; }
    `;

    function buildUI() {
        const style = document.createElement('style');
        style.innerHTML = uiStyles;
        document.head.appendChild(style);

        const gui = document.createElement('div');
        gui.id = 'vip-client-gui';

        let html = `
            <div id="vip-header">${Client.name}</div>
            <div id="vip-body">
                <div id="vip-sidebar">
                    ${Client.categories.map((cat, i) => `
                        <div class="vip-tab ${i === 0 ? 'active' : ''}" data-cat="${cat}">${cat}</div>
                    `).join('')}
                </div>
                <div id="vip-content">
                    ${Client.categories.map((cat, i) => `
                        <div class="module-grid ${i === 0 ? 'active' : ''}" id="grid-${cat}">
                            ${Client.modules.filter(m => m.category === cat).map(m => `
                                <div class="module-btn ${m.enabled ? 'enabled' : ''}" data-mod="${m.name}">
                                    <div class="status-indicator"></div>
                                    <div class="module-title">${m.name}</div>
                                    <div class="module-desc">${m.description}</div>
                                </div>
                            `).join('')}
                        </div>
                    `).join('')}
                </div>
            </div>
        `;
        gui.innerHTML = html;
        document.body.appendChild(gui);

        // Event Listeners for UI
        document.querySelectorAll('.vip-tab').forEach(tab => {
            tab.addEventListener('click', (e) => {
                document.querySelectorAll('.vip-tab').forEach(t => t.classList.remove('active'));
                document.querySelectorAll('.module-grid').forEach(g => g.classList.remove('active'));
                
                tab.classList.add('active');
                document.getElementById(`grid-${tab.dataset.cat}`).classList.add('active');
            });
        });

        document.querySelectorAll('.module-btn').forEach(btn => {
            btn.addEventListener('click', (e) => {
                const modName = btn.dataset.mod;
                const mod = Client.modules.find(m => m.name === modName);
                if (mod) {
                    mod.toggle();
                    if (mod.enabled) {
                        btn.classList.add('enabled');
                    } else {
                        btn.classList.remove('enabled');
                    }
                }
            });
        });
    }

    // ==========================================
    // CORE HOOKS & BYPASSES (WebSocket / Engine)
    // ==========================================
    function initHooks() {
        // Intercept WebSocket to modify packets (Kill Aura, Speed, Top 1)
        const OriginalWS = window.WebSocket;
        window.WebSocket = function(url, protocols) {
            const ws = new OriginalWS(url, protocols);
            Client.hooks.ws = ws;

            const originalSend = ws.send;
            ws.send = function(data) {
                let packet = data;
                // Run packet through enabled modules
                Client.modules.forEach(m => {
                    if (m.enabled) packet = m.onPacketSend(packet);
                });
                
                // Anti-Cheat Bypass injection logic here
                if (packet) return originalSend.call(this, packet);
            };

            ws.addEventListener('message', function(e) {
                let packet = e.data;
                Client.modules.forEach(m => {
                    if (m.enabled) packet = m.onPacketReceive(packet);
                });
                
                // Parse entity data for ESP / Kill Aura
                try {
                    let parsed = JSON.parse(packet);
                    if (parsed.type === "entities") {
                        Client.entities.clear();
                        parsed.data.forEach(ent => Client.entities.set(ent.id, ent));
                    }
                } catch (err) {}
            });

            return ws;
        };
    }

    function gameLoop() {
        requestAnimationFrame(gameLoop);
        Client.modules.forEach(m => {
            if (m.enabled) {
                m.onTick();
                m.onRender();
            }
        });
    }

    // ==========================================
    // INITIALIZATION & KEYBINDS
    // ==========================================
    function init() {
        console.log(`%c[${Client.name}] Injecting...`, 'color: #ff0055; font-size: 20px; font-weight: bold;');
        loadConfig();
        
        // Wait for DOM
        if (document.readyState === 'loading') {
            document.addEventListener('DOMContentLoaded', buildUI);
        } else {
            buildUI();
        }

        initHooks();
        gameLoop();

        // Keybind Handler
        window.addEventListener('keydown', (e) => {
            // Nhấn phím , (dấu phẩy) để bật tắt Menu
            if (e.key === Client.toggleKey) {
                Client.menuOpen = !Client.menuOpen;
                const gui = document.getElementById('vip-client-gui');
                if (gui) {
                    gui.style.display = Client.menuOpen ? 'block' : 'none';
                    // Khóa chuột/bàn phím game khi mở menu nếu cần
                }
            }
        });
        
        console.log(`%c[${Client.name}] Loaded successfully! Press ',' to open menu.`, 'color: #00ffcc; font-size: 16px;');
    }

    init();

})();