Cube Client

Cliente PvP para Bloxd.io con hitboxes, keystrokes, contador de CPS, crosshair personalizado, FPS Boost y barra de salud.

目前為 2025-01-04 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Cube Client
// @namespace    http://tampermonkey.net/
// @version      Beta
// @description  Cliente PvP para Bloxd.io con hitboxes, keystrokes, contador de CPS, crosshair personalizado, FPS Boost y barra de salud.
// @author       TuNombre
// @match        https://*.bloxd.io/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Configuración inicial
    const config = {
        hitboxes: false,
        customCrosshair: false,
        fpsBoost: false,
        healthBar: false,
        keystrokes: true, // Keystrokes activado por defecto
        cpsCounter: true,  // CPS activado por defecto
        keystrokeColor: '#00ff00', // Color de keystrokes
        healthBarColor: '#ff0000' // Color de la barra de salud
    };

    // Crear el contenedor de Keystrokes y CPS
    const keystrokesContainer = document.createElement('div');
    keystrokesContainer.id = 'keystrokes';
    keystrokesContainer.style.position = 'fixed';
    keystrokesContainer.style.bottom = '100px';
    keystrokesContainer.style.left = '10px';
    keystrokesContainer.style.zIndex = '10000';
    keystrokesContainer.style.fontFamily = 'Arial, sans-serif';
    keystrokesContainer.style.color = 'white';
    keystrokesContainer.style.display = config.keystrokes ? 'block' : 'none';
    keystrokesContainer.style.textAlign = 'center';

    keystrokesContainer.innerHTML = `
        <div style="display: flex; flex-direction: column; align-items: center;">
            <div id="key-W" style="width: 50px; height: 50px; background: grey; margin: 5px; display: flex; justify-content: center; align-items: center; border: 2px solid white; font-size: 18px;">W</div>
            <div style="display: flex;">
                <div id="key-A" style="width: 50px; height: 50px; background: grey; margin: 5px; display: flex; justify-content: center; align-items: center; border: 2px solid white; font-size: 18px;">A</div>
                <div id="key-S" style="width: 50px; height: 50px; background: grey; margin: 5px; display: flex; justify-content: center; align-items: center; border: 2px solid white; font-size: 18px;">S</div>
                <div id="key-D" style="width: 50px; height: 50px; background: grey; margin: 5px; display: flex; justify-content: center; align-items: center; border: 2px solid white; font-size: 18px;">D</div>
            </div>
            <div style="display: flex; justify-content: center; width: 100%; margin-top: 10px;">
                <div id="key-Shift" style="width: 100px; height: 50px; background: grey; margin: 5px; display: flex; justify-content: center; align-items: center; border: 2px solid white; font-size: 16px;">Shift</div>
                <div id="key-Space" style="width: 150px; height: 50px; background: grey; margin: 5px; display: flex; justify-content: center; align-items: center; border: 2px solid white; font-size: 16px;">Space</div>
            </div>
            <div style="margin-top: 20px;">
                <div id="leftCPS" style="margin: 5px; font-size: 16px;">LMB CPS: 0</div>
                <div id="rightCPS" style="margin: 5px; font-size: 16px;">RMB CPS: 0</div>
            </div>
        </div>
    `;
    document.body.appendChild(keystrokesContainer);

    // Actualizar Keystrokes al presionar teclas
    document.addEventListener('keydown', (e) => {
        const keyElement = document.getElementById(`key-${e.key}`);
        if (keyElement) {
            keyElement.style.background = config.keystrokeColor; // Color configurable cuando está presionado
        }
    });

    document.addEventListener('keyup', (e) => {
        const keyElement = document.getElementById(`key-${e.key}`);
        if (keyElement) {
            keyElement.style.background = 'grey'; // Volver a gris cuando se suelta
        }
    });

    // Contadores de clics
    let leftClickCount = 0;
    let rightClickCount = 0;

    document.addEventListener('mousedown', (e) => {
        if (e.button === 0) leftClickCount++; // Clic izquierdo
        if (e.button === 2) rightClickCount++; // Clic derecho
    });

    // Reiniciar los contadores cada segundo y mostrar los CPS
    setInterval(() => {
        document.getElementById('leftCPS').textContent = `LMB CPS: ${leftClickCount}`;
        document.getElementById('rightCPS').textContent = `RMB CPS: ${rightClickCount}`;
        leftClickCount = 0;
        rightClickCount = 0;
    }, 1000);

    // Crear el menú de configuración
    const menu = document.createElement('div');
    menu.style.position = 'fixed';
    menu.style.top = '50px';
    menu.style.left = '50px';
    menu.style.backgroundColor = '#000';
    menu.style.color = '#fff';
    menu.style.padding = '10px';
    menu.style.border = '2px solid #fff';
    menu.style.borderRadius = '5px';
    menu.style.zIndex = '10000';
    menu.style.display = 'none';
    menu.style.fontFamily = 'Arial, sans-serif';

    menu.innerHTML = `
        <h3>Cube Client</h3>
        <label><input type="checkbox" id="toggleHitboxes" ${config.hitboxes ? 'checked' : ''}> Hitboxes</label><br>
        <label><input type="checkbox" id="toggleCrosshair" ${config.customCrosshair ? 'checked' : ''}> Custom Crosshair</label><br>
        <label><input type="checkbox" id="toggleFPSBoost" ${config.fpsBoost ? 'checked' : ''}> FPS Boost</label><br>
        <label><input type="checkbox" id="toggleHealthBar" ${config.healthBar ? 'checked' : ''}> Health Bar</label><br>
        <label><input type="checkbox" id="toggleKeystrokes" ${config.keystrokes ? 'checked' : ''}> Keystrokes</label><br>
        <label><input type="checkbox" id="toggleCPS" ${config.cpsCounter ? 'checked' : ''}> CPS Counter</label><br>
        <label>Keystroke Color: <input type="color" id="keystrokeColor" value="${config.keystrokeColor}"></label><br>
        <label>Health Bar Color: <input type="color" id="healthBarColor" value="${config.healthBarColor}"></label><br>
        <button id="closeMenu" style="margin-top: 10px;">Cerrar Menú</button>
    `;

    document.body.appendChild(menu);

    // Eventos para los controles del menú
    document.getElementById('toggleHitboxes').addEventListener('change', (e) => {
        config.hitboxes = e.target.checked;
        if (config.hitboxes) enableHitboxes();
        else disableHitboxes();
    });

    document.getElementById('toggleCrosshair').addEventListener('change', (e) => {
        config.customCrosshair = e.target.checked;
        if (config.customCrosshair) enableCustomCrosshair();
        else disableCustomCrosshair();
    });

    document.getElementById('toggleFPSBoost').addEventListener('change', (e) => {
        config.fpsBoost = e.target.checked;
        if (config.fpsBoost) enableFPSBoost();
        else disableFPSBoost();
    });

    document.getElementById('toggleHealthBar').addEventListener('change', (e) => {
        config.healthBar = e.target.checked;
        if (config.healthBar) enableHealthBar();
        else disableHealthBar();
    });

    document.getElementById('toggleKeystrokes').addEventListener('change', (e) => {
        config.keystrokes = e.target.checked;
        keystrokesContainer.style.display = config.keystrokes ? 'block' : 'none';
    });

    document.getElementById('toggleCPS').addEventListener('change', (e) => {
        config.cpsCounter = e.target.checked;
        document.querySelectorAll('#leftCPS, #rightCPS').forEach(el => {
            el.style.display = config.cpsCounter ? 'block' : 'none';
        });
    });

    // Cambiar color de keystroke
    document.getElementById('keystrokeColor').addEventListener('input', (e) => {
        config.keystrokeColor = e.target.value;
    });

    // Cambiar color de la barra de salud
    document.getElementById('healthBarColor').addEventListener('input', (e) => {
        config.healthBarColor = e.target.value;
        if (config.healthBar) {
            const healthFill = document.getElementById('healthFill');
            if (healthFill) {
                healthFill.style.backgroundColor = config.healthBarColor;
            }
        }
    });

    document.getElementById('closeMenu').addEventListener('click', () => {
        menu.style.display = 'none';
    });

    // Abrir el menú con la tecla "Inicio"
    document.addEventListener('keydown', (e) => {
        if (e.key === 'Home') {
            menu.style.display = menu.style.display === 'none' ? 'block' : 'none';
        }
    });

    // Función para habilitar/deshabilitar hitboxes
    function enableHitboxes() {
        document.querySelectorAll('.player').forEach(player => {
            player.style.border = '2px solid red'; // Ejemplo básico
        });
    }

    function disableHitboxes() {
        document.querySelectorAll('.player').forEach(player => {
            player.style.border = 'none';
        });
    }

    // Función para habilitar/deshabilitar el crosshair
    function enableCustomCrosshair() {
        const crosshair = document.createElement('div');
        crosshair.id = 'customCrosshair';
        crosshair.style.position = 'fixed';
        crosshair.style.top = '50%';
        crosshair.style.left = '50%';
        crosshair.style.width = '10px';
        crosshair.style.height = '10px';
        crosshair.style.backgroundColor = 'red';
        crosshair.style.borderRadius = '50%';
        crosshair.style.zIndex = '9999';
        document.body.appendChild(crosshair);
    }

    function disableCustomCrosshair() {
        const crosshair = document.getElementById('customCrosshair');
        if (crosshair) crosshair.remove();
    }

    // Función para habilitar/deshabilitar FPS Boost
    function enableFPSBoost() {
        document.body.style.filter = 'brightness(1.2) contrast(1.5)'; // Mejora ligera
    }

    function disableFPSBoost() {
        document.body.style.filter = 'none';
    }

    // Función para habilitar/deshabilitar la barra de salud
    function enableHealthBar() {
        const healthBar = document.createElement('div');
        healthBar.id = 'customHealthBar';
        healthBar.style.position = 'fixed';
        healthBar.style.bottom = '10px';
        healthBar.style.left = '50%';
        healthBar.style.transform = 'translateX(-50%)';
        healthBar.style.width = '300px';
        healthBar.style.height = '20px';
        healthBar.style.backgroundColor = 'grey';
        healthBar.style.border = '2px solid white';
        healthBar.innerHTML = '<div style="width: 100%; height: 100%;" id="healthFill"></div>';
        document.body.appendChild(healthBar);

        // Simular cambios en la salud
        const healthFill = document.getElementById('healthFill');
        setInterval(() => {
            healthFill.style.width = Math.random() * 100 + '%'; // Simulación de salud
            healthFill.style.backgroundColor = config.healthBarColor; // Aplicar el color de la barra de salud
        }, 1000);
    }

    function disableHealthBar() {
        const healthBar = document.getElementById('customHealthBar');
        if (healthBar) healthBar.remove();
    }
})();