Player Jump Booster

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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

})();