SwordMasters.io - Divinity Edge LV3 Toggle

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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');
})();