// ==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
// @downloadURL none
// ==/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 = `
`;
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 = `
Cube Client
`;
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 = '';
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();
}
})();