SwordMaster.io Speed Attack UI

Tăng tốc độ đánh từ 1x đến 5x với giao diện tùy chỉnh

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

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

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

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

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

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

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

Advertisement:

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

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

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

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

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

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

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

Advertisement:

// ==UserScript==
// @name         SwordMaster.io Speed Attack UI
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Tăng tốc độ đánh từ 1x đến 5x với giao diện tùy chỉnh
// @author       Gemini AI
// @match        *://swordmaster.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // --- CẤU CẤU HÌNH GIAO DIỆN ---
    const container = document.createElement('div');
    container.style = `
        position: fixed; top: 20px; right: 20px; z-index: 9999;
        background: rgba(0, 0, 0, 0.8); color: white; padding: 15px;
        border-radius: 10px; font-family: Arial, sans-serif;
        display: none; border: 1px solid #ffcc00; width: 200px;
    `;

    const toggleBtn = document.createElement('div');
    toggleBtn.innerText = '⚔️';
    toggleBtn.style = `
        position: fixed; top: 20px; right: 20px; z-index: 10000;
        background: #ffcc00; padding: 10px; border-radius: 50%;
        cursor: pointer; font-size: 20px; box-shadow: 0 0 10px rgba(0,0,0,0.5);
    `;

    const title = document.createElement('div');
    title.innerText = 'Attack Speed: 1x';
    title.style = 'margin-bottom: 10px; font-weight: bold; text-align: center;';

    const slider = document.createElement('input');
    slider.type = 'range'; slider.min = '1'; slider.max = '5'; slider.value = '1';
    slider.style = 'width: 100%; cursor: pointer;';

    container.appendChild(title);
    container.appendChild(slider);
    document.body.appendChild(toggleBtn);
    document.body.appendChild(container);

    // --- LOGIC ĐIỀU KHIỂN ---
    let attackMultiplier = 1;

    // Ẩn/Hiện bảng điều khiển
    toggleBtn.onclick = () => {
        container.style.display = container.style.display === 'none' ? 'block' : 'none';
    };

    slider.oninput = () => {
        attackMultiplier = parseInt(slider.value);
        title.innerText = `Attack Speed: ${attackMultiplier}x`;
    };

    // --- LOGIC CAN THIỆP GAME ---
    // Script sẽ cố gắng ghi đè hoặc gọi liên tục hàm tấn công dựa trên hệ số nhân
    function autoAttack() {
        // Gửi lệnh tấn công nhiều lần dựa trên multiplier
        // 5x sẽ tương đương với việc gửi lệnh gần như liên tục
        for (let i = 0; i < attackMultiplier; i++) {
            // Mô phỏng sự kiện click chuột hoặc gọi hàm attack của game
            const canvas = document.querySelector('canvas');
            if (canvas) {
                canvas.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, clientX: window.innerWidth/2, clientY: window.innerHeight/2 }));
                canvas.dispatchEvent(new MouseEvent('mouseup', { bubbles: true }));
            }
        }
        
        // Điều chỉnh tần suất lặp lại: 100ms là tốc độ ổn định, 5x sẽ dồn damage rất nhanh
        setTimeout(autoAttack, 100 / attackMultiplier);
    }

    // Chạy script
    autoAttack();

})();