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)

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

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

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

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

})();