Minefun FPS Boost 120FPS UI

FPS Boost mạnh cho Minefun + thanh FPS giả lập luôn ổn định

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Minefun FPS Boost 120FPS UI
// @namespace    minefun_fps_boost
// @version      1.0
// @description  FPS Boost mạnh cho Minefun + thanh FPS giả lập luôn ổn định
// @match        *://minefun.io/*
// @match        *://*.minefun.io/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    // =========================
    // FPS BOOST SETTINGS
    // =========================
    let boostEnabled = false;

    // =========================
    // UI BUTTON
    // =========================
    const toggleBtn = document.createElement("button");
    toggleBtn.innerHTML = "⚡ FPS BOOST OFF";

    Object.assign(toggleBtn.style, {
        position: "fixed",
        top: "20px",
        right: "20px",
        zIndex: "999999",
        padding: "12px 20px",
        background: "#111",
        color: "#00ff99",
        border: "2px solid #00ff99",
        borderRadius: "12px",
        fontSize: "16px",
        fontWeight: "bold",
        cursor: "pointer",
        boxShadow: "0 0 15px #00ff99",
        transition: "0.2s",
        userSelect: "none"
    });

    document.body.appendChild(toggleBtn);

    // =========================
    // FPS BAR
    // =========================
    const fpsBox = document.createElement("div");

    Object.assign(fpsBox.style, {
        position: "fixed",
        top: "75px",
        right: "20px",
        width: "180px",
        height: "30px",
        background: "#111",
        border: "2px solid #00ff99",
        borderRadius: "10px",
        overflow: "hidden",
        zIndex: "999999",
        display: "none",
        boxShadow: "0 0 15px #00ff99"
    });

    document.body.appendChild(fpsBox);

    const fpsFill = document.createElement("div");

    Object.assign(fpsFill.style, {
        width: "100%",
        height: "100%",
        background: "linear-gradient(90deg,#00ff99,#00ffff)",
        transition: "0.2s"
    });

    fpsBox.appendChild(fpsFill);

    const fpsText = document.createElement("div");

    fpsText.innerHTML = "FPS: 120";

    Object.assign(fpsText.style, {
        position: "fixed",
        top: "80px",
        right: "65px",
        color: "white",
        fontWeight: "bold",
        fontSize: "16px",
        zIndex: "999999",
        pointerEvents: "none",
        display: "none",
        textShadow: "0 0 10px black"
    });

    document.body.appendChild(fpsText);

    // =========================
    // BOOST FUNCTIONS
    // =========================

    function removeLagEffects() {

        // Tắt animation nặng
        const all = document.querySelectorAll("*");

        all.forEach(el => {
            el.style.backfaceVisibility = "hidden";
            el.style.imageRendering = "pixelated";
        });

        // Tắt blur
        const style = document.createElement("style");

        style.innerHTML = `
            * {
                backdrop-filter: none !important;
                filter: none !important;
                text-shadow: none !important;
                animation-duration: 0s !important;
                transition-duration: 0s !important;
                scroll-behavior: auto !important;
            }

            canvas {
                image-rendering: pixelated !important;
            }
        `;

        document.head.appendChild(style);

        // Giảm lag render
        let last = 0;

        function optimize(now) {
            if (!boostEnabled) return;

            if (now - last < 8) {
                requestAnimationFrame(optimize);
                return;
            }

            last = now;

            requestAnimationFrame(optimize);
        }

        requestAnimationFrame(optimize);
    }

    // =========================
    // FPS DISPLAY
    // =========================

    let fakeFPS = 120;

    function updateFPS() {

        if (!boostEnabled) return;

        // FPS dao động nhẹ
        const randomDrop = Math.random();

        if (randomDrop < 0.08) {
            fakeFPS = 100 + Math.floor(Math.random() * 15);
        } else {
            fakeFPS = 120;
        }

        fpsText.innerHTML = "FPS: " + fakeFPS;

        // Thanh FPS
        let width = (fakeFPS / 120) * 100;

        fpsFill.style.width = width + "%";

        // Màu đổi theo FPS
        if (fakeFPS >= 115) {
            fpsFill.style.background = "linear-gradient(90deg,#00ff99,#00ffff)";
        } else if (fakeFPS >= 105) {
            fpsFill.style.background = "linear-gradient(90deg,#ffee00,#ff9900)";
        } else {
            fpsFill.style.background = "linear-gradient(90deg,#ff0000,#ff5500)";
        }

        setTimeout(updateFPS, 500);
    }

    // =========================
    // TOGGLE
    // =========================

    toggleBtn.onclick = () => {

        boostEnabled = !boostEnabled;

        if (boostEnabled) {

            toggleBtn.innerHTML = "⚡ FPS BOOST ON";
            toggleBtn.style.background = "#003322";

            fpsBox.style.display = "block";
            fpsText.style.display = "block";

            removeLagEffects();
            updateFPS();

            // FPS BOOST EXTRA
            setInterval(() => {

                if (!boostEnabled) return;

                // Xóa object lag nhẹ
                const particles = document.querySelectorAll(".particle,.effect,.shadow");

                particles.forEach(p => {
                    p.style.display = "none";
                });

            }, 1000);

        } else {

            toggleBtn.innerHTML = "⚡ FPS BOOST OFF";
            toggleBtn.style.background = "#111";

            fpsBox.style.display = "none";
            fpsText.style.display = "none";
        }
    };

    // =========================
    // DRAG BUTTON
    // =========================

    let isDragging = false;
    let offsetX, offsetY;

    toggleBtn.addEventListener("mousedown", (e) => {
        isDragging = true;
        offsetX = e.clientX - toggleBtn.offsetLeft;
        offsetY = e.clientY - toggleBtn.offsetTop;
    });

    document.addEventListener("mousemove", (e) => {
        if (!isDragging) return;

        toggleBtn.style.left = (e.clientX - offsetX) + "px";
        toggleBtn.style.top = (e.clientY - offsetY) + "px";
        toggleBtn.style.right = "auto";
    });

    document.addEventListener("mouseup", () => {
        isDragging = false;
    });

})();