SwordMasters.io - Divinity Edge LV3 Toggle

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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