Player Jump Booster

Bật/tắt tăng tốc độ nhảy bằng phím dấu phẩy (,)

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         Player Jump Booster
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Bật/tắt tăng tốc độ nhảy bằng phím dấu phẩy (,)
// @author       YourName
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let isActive = false;
    const JUMP_SPEED = 15;

    // Tạo nút hiển thị trạng thái nhỏ gọn
    const btn = document.createElement('div');
    btn.innerHTML = "Jump: OFF";
    Object.assign(btn.style, {
        position: 'fixed',
        bottom: '10px',
        right: '10px',
        padding: '4px 8px',
        background: 'rgba(0, 0, 0, 0.7)',
        color: 'white',
        fontSize: '11px',
        borderRadius: '4px',
        zIndex: '9999',
        pointerEvents: 'none',
        fontFamily: 'sans-serif'
    });
    document.body.appendChild(btn);

    // Hàm cập nhật trạng thái
    function toggleHack() {
        isActive = !isActive;
        btn.innerHTML = `Jump: ${isActive ? 'ON' : 'OFF'}`;
        btn.style.color = isActive ? '#00ff00' : 'white';
    }

    // Lắng nghe phím phẩy (,)
    window.addEventListener('keydown', (e) => {
        if (e.key === ',') {
            toggleHack();
        }
    });

    // Logic chính của bạn
    api.on("join", (player) => {
        // Ghi đè hàm hoặc kiểm tra trạng thái khi nhảy
        const originalJump = player.setJumpSpeed;
        
        // Vòng lặp kiểm tra hoặc hook vào sự kiện nhảy của game
        setInterval(() => {
            if (isActive) {
                player.setJumpSpeed(JUMP_SPEED);
            } else {
                player.setJumpSpeed(2); // Giả sử 2 là tốc độ mặc định
            }
        }, 100);
    });

})();