Minefun Fake 3D Pro UI

Fake 3D + UI kéo thả + resize

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

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

Tendrás que instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Tendrás que instalar una extensión como Tampermonkey antes de poder instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name         Minefun Fake 3D Pro UI
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Fake 3D + UI kéo thả + resize
// @author       You
// @match        *://minefun.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let scale = 1;
    let enabled = false;

    // Tạo UI chính
    const box = document.createElement("div");
    box.style.position = "fixed";
    box.style.top = "120px";
    box.style.left = "20px";
    box.style.padding = "10px";
    box.style.background = "linear-gradient(135deg,#00c6ff,#0072ff)";
    box.style.color = "white";
    box.style.borderRadius = "12px";
    box.style.boxShadow = "0 0 20px rgba(0,0,0,0.5)";
    box.style.zIndex = "9999";
    box.style.fontFamily = "Arial";
    box.style.textAlign = "center";
    box.style.cursor = "move";
    box.style.userSelect = "none";

    // Nút ON/OFF
    const btn = document.createElement("div");
    btn.innerText = "OFF";
    btn.style.padding = "8px";
    btn.style.marginBottom = "5px";
    btn.style.background = "red";
    btn.style.borderRadius = "8px";
    btn.style.cursor = "pointer";

    // Nút +
    const plus = document.createElement("button");
    plus.innerText = "+";
    plus.style.margin = "2px";

    // Nút -
    const minus = document.createElement("button");
    minus.innerText = "-";
    minus.style.margin = "2px";

    // Text kéo thả
    const dragText = document.createElement("div");
    dragText.innerText = "Kéo thả";
    dragText.style.fontSize = "12px";
    dragText.style.opacity = "0.8";

    box.appendChild(btn);
    box.appendChild(plus);
    box.appendChild(minus);
    box.appendChild(dragText);
    document.body.appendChild(box);

    // Bật tắt 3D
    btn.onclick = function() {
        enabled = !enabled;
        if (enabled) {
            btn.innerText = "ON";
            btn.style.background = "green";

            const style = document.createElement("style");
            style.id = "fake3d";
            style.innerHTML = `
                canvas {
                    filter: drop-shadow(6px 6px 12px rgba(0,0,0,0.7)) brightness(1.1);
                }
                * {
                    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
                }
            `;
            document.head.appendChild(style);

        } else {
            btn.innerText = "OFF";
            btn.style.background = "red";

            const s = document.getElementById("fake3d");
            if (s) s.remove();
        }
    };

    // Resize UI
    plus.onclick = function(e) {
        e.stopPropagation();
        scale += 0.1;
        box.style.transform = `scale(${scale})`;
    };

    minus.onclick = function(e) {
        e.stopPropagation();
        scale -= 0.1;
        if (scale < 0.5) scale = 0.5;
        box.style.transform = `scale(${scale})`;
    };

    // Kéo thả UI
    let isDragging = false, offsetX, offsetY;

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

    document.addEventListener("mousemove", function(e) {
        if (isDragging) {
            box.style.left = (e.clientX - offsetX) + "px";
            box.style.top = (e.clientY - offsetY) + "px";
        }
    });

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

})();