SwordMaster.io Speed Attack UI

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

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

Um dieses Skript zu installieren, müssen Sie eine Erweiterung wie Tampermonkey oder Violentmonkey installieren.

Um dieses Skript zu installieren, müssen Sie eine Erweiterung wie Tampermonkey oder Violentmonkey installieren.

Um dieses Skript zu installieren, müssen Sie eine Erweiterung wie Tampermonkey oder Userscripts installieren.

Um dieses Skript zu installieren, müssen Sie eine Erweiterung wie Tampermonkey installieren.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

Um dieses Design zu installieren, müssen Sie eine Erweiterung wie Stylus installieren.

Um dieses Design zu installieren, müssen Sie eine Erweiterung wie Stylus installieren.

Um dieses Design zu installieren, müssen Sie eine Erweiterung wie Stylus installieren.

Um diesen Stil zu installieren, müssen Sie eine Erweiterung für den Benutzerstil Verwaltung installieren.

Um diesen Stil zu installieren, müssen Sie eine Erweiterung für den Benutzerstil Verwaltung installieren.

Um diesen Stil zu installieren, müssen Sie eine Erweiterung für den Benutzerstil Verwaltung installieren.

(Ich habe bereits einen Benutzerstil Verwaltung, ich möchte ihn installieren!)

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

})();