SwordMasters.io - Divinity Edge LV3 Toggle

Nút ON/OFF đơn giản cho SwordMasters.io (chỉ giao diện)

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

You will need to install an extension such as Tampermonkey 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         SwordMasters.io - Divinity Edge LV3 Toggle
// @namespace    https://greasyfork.org/users/yourname
// @version      1.0
// @description  Nút ON/OFF đơn giản cho SwordMasters.io (chỉ giao diện)
// @author       Grok
// @match        *://swordmasters.io/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    let isOn = false;

    // Tạo nút toggle
    function createToggleButton() {
        const btn = document.createElement('button');
        btn.id = 'divinity-toggle-btn';
        btn.style.position = 'fixed';
        btn.style.top = '20px';
        btn.style.right = '20px';
        btn.style.zIndex = '99999';
        btn.style.padding = '12px 20px';
        btn.style.backgroundColor = '#ff4444';
        btn.style.color = 'white';
        btn.style.border = 'none';
        btn.style.borderRadius = '8px';
        btn.style.fontSize = '16px';
        btn.style.fontWeight = 'bold';
        btn.style.cursor = 'pointer';
        btn.style.boxShadow = '0 4px 10px rgba(0,0,0,0.3)';
        btn.innerHTML = '🔴 Divinity Edge LV3: OFF';

        btn.addEventListener('click', () => {
            isOn = !isOn;
            
            if (isOn) {
                btn.style.backgroundColor = '#44ff44';
                btn.innerHTML = '🟢 Divinity Edge LV3: ON<br><small>Đang kích hoạt...</small>';
                console.log('%c[Divinity Toggle] BẬT - Chúc may mắn!', 'color: lime; font-size: 16px');
                // Bạn có thể thêm code tự động ở đây sau (nếu có)
                alert('Đã bật chế độ Divinity Edge LV3!\n\nLưu ý: Đây chỉ là nút giao diện. Game vẫn cần grind bình thường.');
            } else {
                btn.style.backgroundColor = '#ff4444';
                btn.innerHTML = '🔴 Divinity Edge LV3: OFF';
                console.log('%c[Divinity Toggle] TẮT', 'color: red; font-size: 14px');
            }
        });

        document.body.appendChild(btn);
    }

    // Chờ game load xong rồi tạo nút
    const observer = new MutationObserver(() => {
        if (document.body) {
            createToggleButton();
            observer.disconnect();
        }
    });

    observer.observe(document.documentElement, { childList: true, subtree: true });

    console.log('%cSwordMasters.io Divinity Toggle script đã load!', 'color: cyan; font-size: 14px');
})();