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 or Violentmonkey to install this script.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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