Player Jump Booster

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

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

})();