Minefun Fake 3D Pro UI

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

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

})();