Player Jump Booster

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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

})();