Sword Master Kill Aura Pro

Cố gắng tối ưu hóa tốc độ đánh lên Mob (Sử dụng cẩn thận)

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Sword Master Kill Aura Pro
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Cố gắng tối ưu hóa tốc độ đánh lên Mob (Sử dụng cẩn thận)
// @author       YourName
// @match        *://*.sword-master.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let isEnabled = false;
    let multiplier = 100; // Mặc định x100, bạn có thể chỉnh lên nhưng dễ lag
    let intervalId = null;

    // --- Giao diện UI ---
    const menu = document.createElement('div');
    menu.innerHTML = `
        <div id="ka-menu" style="position: fixed; top: 10px; right: 10px; z-index: 9999; background: #222; color: #fff; padding: 10px; border-radius: 8px; font-family: sans-serif; border: 2px solid #444;">
            <h4 style="margin: 0 0 10px 0; text-align: center;">Kill Aura x8000</h4>
            <button id="toggle-ka" style="width: 100%; padding: 5px; cursor: pointer; background: #ff4444; border: none; color: white; font-weight: bold;">OFF</button>
            <div style="margin-top: 10px;">
                Tốc độ: <input type="number" id="ka-mult" value="100" style="width: 50px;"> x
            </div>
        </div>
    `;
    document.body.appendChild(menu);

    const btn = document.getElementById('toggle-ka');
    const inputMult = document.getElementById('ka-mult');

    // --- Logic Kill Aura ---
    // Lưu ý: Cơ chế thực tế phụ thuộc vào cách Game xử lý Event Click
    function attackMob() {
        if (!isEnabled) return;

        // Tìm các đối tượng mob (Cần inspect game để lấy đúng Selector/Object)
        // Đây là ví dụ giả định game dùng canvas hoặc DOM elements
        const mobs = document.querySelectorAll('.mob, canvas'); // Thay đổi theo cấu trúc game

        mobs.forEach(mob => {
            for (let i = 0; i < multiplier; i++) {
                // Tạo một sự kiện click giả lập hoặc gọi hàm đánh của Game
                const event = new MouseEvent('click', {
                    view: window,
                    bubbles: true,
                    cancelable: true
                });
                mob.dispatchEvent(event);
            }
        });
    }

    // --- Điều khiển ---
    btn.onclick = () => {
        isEnabled = !isEnabled;
        multiplier = parseInt(inputMult.value) || 100;
        
        if (isEnabled) {
            btn.innerText = "ON";
            btn.style.backgroundColor = "#44ff44";
            // Chạy vòng lặp đánh (tốc độ cao nhất có thể của trình duyệt)
            intervalId = setInterval(attackMob, 50); 
        } else {
            btn.innerText = "OFF";
            btn.style.backgroundColor = "#ff4444";
            clearInterval(intervalId);
        }
    };

})();