Minefun Fake 3D Pro UI

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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;
    });

})();