Cube Client

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

当前为 2025-01-04 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Cube Client
  3. // @namespace http://tampermonkey.net/
  4. // @version Beta
  5. // @description Cliente PvP para Bloxd.io con hitboxes, keystrokes, contador de CPS, crosshair personalizado, FPS Boost y barra de salud.
  6. // @author TuNombre
  7. // @match https://*.bloxd.io/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Configuración inicial
  16. const config = {
  17. hitboxes: false,
  18. customCrosshair: false,
  19. fpsBoost: false,
  20. healthBar: false,
  21. keystrokes: true, // Keystrokes activado por defecto
  22. cpsCounter: true, // CPS activado por defecto
  23. keystrokeColor: '#00ff00', // Color de keystrokes
  24. keystrokeBackgroundColor: '#333333', // Fondo predeterminado de las teclas
  25. healthBarColor: '#ff0000', // Color de la barra de salud
  26. keystrokeSize: '50px', // Tamaño de las teclas
  27. };
  28.  
  29. // Crear el contenedor de Keystrokes y CPS
  30. const keystrokesContainer = document.createElement('div');
  31. keystrokesContainer.id = 'keystrokes';
  32. keystrokesContainer.style.position = 'fixed';
  33. keystrokesContainer.style.bottom = '100px';
  34. keystrokesContainer.style.left = '10px';
  35. keystrokesContainer.style.zIndex = '10000';
  36. keystrokesContainer.style.fontFamily = 'Arial, sans-serif';
  37. keystrokesContainer.style.color = 'white';
  38. keystrokesContainer.style.display = config.keystrokes ? 'block' : 'none';
  39. keystrokesContainer.style.textAlign = 'center';
  40. keystrokesContainer.style.cursor = 'move';
  41.  
  42. keystrokesContainer.innerHTML = `
  43. <div style="display: flex; flex-direction: column; align-items: center;">
  44. <div id="key-W" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor};">W</div>
  45. <div style="display: flex;">
  46. <div id="key-A" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor};">A</div>
  47. <div id="key-S" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor};">S</div>
  48. <div id="key-D" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor};">D</div>
  49. </div>
  50. <div style="display: flex; justify-content: center; width: 100%; margin-top: 10px;">
  51. <div id="key-Shift" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor};">Shift</div>
  52. <div id="key-Space" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor};">Space</div>
  53. </div>
  54. <div style="margin-top: 20px;">
  55. <div id="leftCPS" style="margin: 5px; font-size: 16px;">LMB CPS: 0</div>
  56. <div id="rightCPS" style="margin: 5px; font-size: 16px;">RMB CPS: 0</div>
  57. </div>
  58. </div>
  59. `;
  60. document.body.appendChild(keystrokesContainer);
  61.  
  62. // Función para hacer el contenedor de keystrokes arrastrable
  63. let isDragging = false;
  64. let offsetX, offsetY;
  65.  
  66. keystrokesContainer.addEventListener('mousedown', (e) => {
  67. isDragging = true;
  68. offsetX = e.clientX - keystrokesContainer.getBoundingClientRect().left;
  69. offsetY = e.clientY - keystrokesContainer.getBoundingClientRect().top;
  70. keystrokesContainer.style.cursor = 'grabbing';
  71. });
  72.  
  73. document.addEventListener('mousemove', (e) => {
  74. if (isDragging) {
  75. keystrokesContainer.style.left = `${e.clientX - offsetX}px`;
  76. keystrokesContainer.style.top = `${e.clientY - offsetY}px`;
  77. }
  78. });
  79.  
  80. document.addEventListener('mouseup', () => {
  81. isDragging = false;
  82. keystrokesContainer.style.cursor = 'move';
  83. });
  84.  
  85. // Actualizar Keystrokes al presionar teclas
  86. document.addEventListener('keydown', (e) => {
  87. const keyElement = document.getElementById(`key-${e.key}`);
  88. if (keyElement) {
  89. keyElement.style.background = config.keystrokeColor; // Color configurable cuando está presionado
  90. }
  91. });
  92.  
  93. document.addEventListener('keyup', (e) => {
  94. const keyElement = document.getElementById(`key-${e.key}`);
  95. if (keyElement) {
  96. keyElement.style.background = config.keystrokeBackgroundColor; // Vuelve al color de fondo predeterminado cuando se suelta
  97. }
  98. });
  99.  
  100. // Contadores de clics
  101. let leftClickCount = 0;
  102. let rightClickCount = 0;
  103.  
  104. document.addEventListener('mousedown', (e) => {
  105. if (e.button === 0) leftClickCount++; // Clic izquierdo
  106. if (e.button === 2) rightClickCount++; // Clic derecho
  107. });
  108.  
  109. // Reiniciar los contadores cada segundo y mostrar los CPS
  110. setInterval(() => {
  111. document.getElementById('leftCPS').textContent = `LMB CPS: ${leftClickCount}`;
  112. document.getElementById('rightCPS').textContent = `RMB CPS: ${rightClickCount}`;
  113. leftClickCount = 0;
  114. rightClickCount = 0;
  115. }, 1000);
  116.  
  117. // Crear el menú de configuración
  118. const menu = document.createElement('div');
  119. menu.style.position = 'fixed';
  120. menu.style.top = '50px';
  121. menu.style.left = '50px';
  122. menu.style.backgroundColor = '#000';
  123. menu.style.color = '#fff';
  124. menu.style.padding = '10px';
  125. menu.style.border = '2px solid #fff';
  126. menu.style.borderRadius = '5px';
  127. menu.style.zIndex = '10000';
  128. menu.style.display = 'none';
  129. menu.style.fontFamily = 'Arial, sans-serif';
  130.  
  131. menu.innerHTML = `
  132. <h3>Cube Client</h3>
  133. <label><input type="checkbox" id="toggleHitboxes" ${config.hitboxes ? 'checked' : ''}> Hitboxes</label><br>
  134. <label><input type="checkbox" id="toggleCrosshair" ${config.customCrosshair ? 'checked' : ''}> Custom Crosshair</label><br>
  135. <label><input type="checkbox" id="toggleFPSBoost" ${config.fpsBoost ? 'checked' : ''}> FPS Boost</label><br>
  136. <label><input type="checkbox" id="toggleHealthBar" ${config.healthBar ? 'checked' : ''}> Health Bar</label><br>
  137. <label><input type="checkbox" id="toggleKeystrokes" ${config.keystrokes ? 'checked' : ''}> Keystrokes</label><br>
  138. <label><input type="checkbox" id="toggleCPS" ${config.cpsCounter ? 'checked' : ''}> CPS Counter</label><br>
  139. <label>Keystroke Color: <input type="color" id="keystrokeColor" value="${config.keystrokeColor}"></label><br>
  140. <label>Health Bar Color: <input type="color" id="healthBarColor" value="${config.healthBarColor}"></label><br>
  141. <button id="closeMenu" style="margin-top: 10px;">Cerrar Menú</button>
  142. `;
  143.  
  144. document.body.appendChild(menu);
  145.  
  146. // Eventos para los controles del menú
  147. document.getElementById('toggleHitboxes').addEventListener('change', (e) => {
  148. config.hitboxes = e.target.checked;
  149. if (config.hitboxes) enableHitboxes();
  150. else disableHitboxes();
  151. });
  152.  
  153. document.getElementById('toggleCrosshair').addEventListener('change', (e) => {
  154. config.customCrosshair = e.target.checked;
  155. if (config.customCrosshair) enableCustomCrosshair();
  156. else disableCustomCrosshair();
  157. });
  158.  
  159. document.getElementById('toggleFPSBoost').addEventListener('change', (e) => {
  160. config.fpsBoost = e.target.checked;
  161. if (config.fpsBoost) enableFPSBoost();
  162. else disableFPSBoost();
  163. });
  164.  
  165. document.getElementById('toggleHealthBar').addEventListener('change', (e) => {
  166. config.healthBar = e.target.checked;
  167. if (config.healthBar) enableHealthBar();
  168. else disableHealthBar();
  169. });
  170.  
  171. document.getElementById('toggleKeystrokes').addEventListener('change', (e) => {
  172. config.keystrokes = e.target.checked;
  173. keystrokesContainer.style.display = config.keystrokes ? 'block' : 'none';
  174. });
  175.  
  176. document.getElementById('toggleCPS').addEventListener('change', (e) => {
  177. config.cpsCounter = e.target.checked;
  178. document.getElementById('leftCPS').style.display = config.cpsCounter ? 'block' : 'none';
  179. document.getElementById('rightCPS').style.display = config.cpsCounter ? 'block' : 'none';
  180. });
  181.  
  182. document.getElementById('keystrokeColor').addEventListener('input', (e) => {
  183. config.keystrokeColor = e.target.value;
  184. });
  185.  
  186. document.getElementById('healthBarColor').addEventListener('input', (e) => {
  187. config.healthBarColor = e.target.value;
  188. });
  189.  
  190. document.getElementById('closeMenu').addEventListener('click', () => {
  191. menu.style.display = 'none';
  192. });
  193.  
  194. // Abrir el menú con la tecla "Inicio"
  195. document.addEventListener('keydown', (e) => {
  196. if (e.key === 'Home') {
  197. menu.style.display = menu.style.display === 'none' ? 'block' : 'none';
  198. }
  199. });
  200.  
  201. // Función para habilitar/deshabilitar hitboxes
  202. function enableHitboxes() {
  203. document.querySelectorAll('.player').forEach(player => {
  204. player.style.border = '2px solid red'; // Ejemplo básico
  205. });
  206. }
  207.  
  208. function disableHitboxes() {
  209. document.querySelectorAll('.player').forEach(player => {
  210. player.style.border = 'none';
  211. });
  212. }
  213.  
  214. // Función para habilitar/deshabilitar el crosshair
  215. function enableCustomCrosshair() {
  216. const crosshair = document.createElement('div');
  217. crosshair.id = 'customCrosshair';
  218. crosshair.style.position = 'fixed';
  219. crosshair.style.top = '50%';
  220. crosshair.style.left = '50%';
  221. crosshair.style.width = '10px';
  222. crosshair.style.height = '10px';
  223. crosshair.style.backgroundColor = 'red';
  224. crosshair.style.borderRadius = '50%';
  225. crosshair.style.zIndex = '9999';
  226. document.body.appendChild(crosshair);
  227. }
  228.  
  229. function disableCustomCrosshair() {
  230. const crosshair = document.getElementById('customCrosshair');
  231. if (crosshair) crosshair.remove();
  232. }
  233.  
  234. // Función para habilitar/deshabilitar FPS Boost
  235. function enableFPSBoost() {
  236. document.body.style.filter = 'brightness(1.2) contrast(1.5)'; // Mejora ligera
  237. }
  238.  
  239. function disableFPSBoost() {
  240. document.body.style.filter = 'none';
  241. }
  242.  
  243. // Función para habilitar/deshabilitar la barra de salud
  244. function enableHealthBar() {
  245. const healthBar = document.createElement('div');
  246. healthBar.id = 'customHealthBar';
  247. healthBar.style.position = 'fixed';
  248. healthBar.style.bottom = '10px';
  249. healthBar.style.left = '50%';
  250. healthBar.style.transform = 'translateX(-50%)';
  251. healthBar.style.width = '300px';
  252. healthBar.style.height = '20px';
  253. healthBar.style.backgroundColor = 'grey';
  254. healthBar.style.border = '2px solid white';
  255. healthBar.innerHTML = `<div style="width: 100%; height: 100%; background: ${config.healthBarColor}" id="healthFill"></div>`;
  256. document.body.appendChild(healthBar);
  257.  
  258. // Simular cambios en la salud
  259. const healthFill = document.getElementById('healthFill');
  260. setInterval(() => {
  261. healthFill.style.width = Math.random() * 100 + '%'; // Simulación de salud
  262. }, 1000);
  263. }
  264.  
  265. function disableHealthBar() {
  266. const healthBar = document.getElementById('customHealthBar');
  267. if (healthBar) healthBar.remove();
  268. }
  269. })();