SwordMasters.io - Custom UI Panel

Panel kéo được + On/Off + Slider (UI only, safe)

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         SwordMasters.io - Custom UI Panel
// @namespace    https://greasyfork.org/
// @version      2.0
// @description  Panel kéo được + On/Off + Slider (UI only, safe)
// @match        https://swordmasters.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let value = 50;
    let isEnabled = false;

    const panel = document.createElement('div');
    panel.style.cssText = `
        position: fixed; left: 30px; top: 30px; z-index: 999999;
        background: rgba(0,0,0,0.85); color: white; padding: 15px;
        border-radius: 12px; font-family: Arial; width: 250px;
    `;

    panel.innerHTML = `
        <div style="font-weight:bold; margin-bottom:10px;">⚔️ Custom Panel</div>
        <div id="status">OFF</div>

        <input type="range" id="slider" min="1" max="100" value="${value}">
        <div>Value: <span id="val">${value}</span></div>

        <button id="btn">BẬT</button>
    `;

    document.body.appendChild(panel);

    const slider = panel.querySelector('#slider');
    const val = panel.querySelector('#val');
    const btn = panel.querySelector('#btn');
    const status = panel.querySelector('#status');

    slider.oninput = () => {
        value = slider.value;
        val.textContent = value;
    };

    btn.onclick = () => {
        isEnabled = !isEnabled;
        status.textContent = isEnabled ? "ON" : "OFF";
    };

    // drag
    let drag = false, x, y;

    panel.onmousedown = (e) => {
        drag = true;
        x = e.clientX - panel.offsetLeft;
        y = e.clientY - panel.offsetTop;
    };

    document.onmousemove = (e) => {
        if (drag) {
            panel.style.left = (e.clientX - x) + "px";
            panel.style.top = (e.clientY - y) + "px";
        }
    };

    document.onmouseup = () => drag = false;

})();