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 0.1
  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. keystrokeFontSize: '25px', // Tamaño de fuente para las letras en las teclas
  28. keystrokeBorderColor: '#ffffff', // Color del borde (no editable)
  29. };
  30.  
  31. // Crear el contenedor de Keystrokes y CPS
  32. const keystrokesContainer = document.createElement('div');
  33. keystrokesContainer.id = 'keystrokes';
  34. keystrokesContainer.style.position = 'fixed';
  35. keystrokesContainer.style.bottom = '100px';
  36. keystrokesContainer.style.left = '10px';
  37. keystrokesContainer.style.zIndex = '10000';
  38. keystrokesContainer.style.fontFamily = 'Arial, sans-serif';
  39. keystrokesContainer.style.color = 'white';
  40. keystrokesContainer.style.display = config.keystrokes ? 'block' : 'none';
  41. keystrokesContainer.style.textAlign = 'center';
  42. keystrokesContainer.style.cursor = 'move';
  43.  
  44. keystrokesContainer.innerHTML = `
  45. <div style="display: flex; flex-direction: column; align-items: center;">
  46. <div id="key-W" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor}; border: 2px solid ${config.keystrokeBorderColor}; font-size: ${config.keystrokeFontSize}; display: flex; align-items: center; justify-content: center;">W</div>
  47. <div style="display: flex;">
  48. <div id="key-A" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor}; border: 2px solid ${config.keystrokeBorderColor}; font-size: ${config.keystrokeFontSize}; display: flex; align-items: center; justify-content: center;">A</div>
  49. <div id="key-S" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor}; border: 2px solid ${config.keystrokeBorderColor}; font-size: ${config.keystrokeFontSize}; display: flex; align-items: center; justify-content: center;">S</div>
  50. <div id="key-D" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor}; border: 2px solid ${config.keystrokeBorderColor}; font-size: ${config.keystrokeFontSize}; display: flex; align-items: center; justify-content: center;">D</div>
  51. </div>
  52. <div style="display: flex; justify-content: center; width: 100%; margin-top: 10px;">
  53. <div id="key-Shift" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor}; border: 2px solid ${config.keystrokeBorderColor}; font-size: ${config.keystrokeFontSize}; display: flex; align-items: center; justify-content: center;">Shift</div>
  54. <div id="key-Space" class="key" style="width: ${config.keystrokeSize}; height: ${config.keystrokeSize}; background-color: ${config.keystrokeBackgroundColor}; border: 2px solid ${config.keystrokeBorderColor}; font-size: ${config.keystrokeFontSize}; display: flex; align-items: center; justify-content: center;">Space</div>
  55. </div>
  56. <div style="margin-top: 20px;">
  57. <div id="leftCPS" style="margin: 5px; font-size: 16px;">LMB CPS: 0</div>
  58. <div id="rightCPS" style="margin: 5px; font-size: 16px;">RMB CPS: 0</div>
  59. </div>
  60. </div>
  61. `;
  62. document.body.appendChild(keystrokesContainer);
  63.  
  64. // Función para hacer el contenedor de keystrokes arrastrable
  65. let isDragging = false;
  66. let offsetX, offsetY;
  67.  
  68. keystrokesContainer.addEventListener('mousedown', (e) => {
  69. isDragging = true;
  70. offsetX = e.clientX - keystrokesContainer.getBoundingClientRect().left;
  71. offsetY = e.clientY - keystrokesContainer.getBoundingClientRect().top;
  72. keystrokesContainer.style.cursor = 'grabbing';
  73. });
  74.  
  75. document.addEventListener('mousemove', (e) => {
  76. if (isDragging) {
  77. keystrokesContainer.style.left = `${e.clientX - offsetX}px`;
  78. keystrokesContainer.style.top = `${e.clientY - offsetY}px`;
  79. }
  80. });
  81.  
  82. document.addEventListener('mouseup', () => {
  83. isDragging = false;
  84. keystrokesContainer.style.cursor = 'move';
  85. });
  86.  
  87. // Variables para el manejo de clics
  88. let lastLeftClickTime = 0;
  89. let lastRightClickTime = 0;
  90. const clickCooldown = 100; // en milisegundos (100ms de espera entre clics)
  91.  
  92. // Actualizar Keystrokes al presionar teclas
  93. document.addEventListener('keydown', (e) => {
  94. const keyElement = document.getElementById(`key-${e.key}`);
  95. if (keyElement) {
  96. keyElement.style.background = config.keystrokeColor; // Color configurable cuando está presionado
  97. }
  98. });
  99.  
  100. document.addEventListener('keyup', (e) => {
  101. const keyElement = document.getElementById(`key-${e.key}`);
  102. if (keyElement) {
  103. keyElement.style.background = config.keystrokeBackgroundColor; // Vuelve al color de fondo predeterminado cuando se suelta
  104. }
  105. });
  106.  
  107. // Manejo de clics para CPS
  108. document.addEventListener('mousedown', (e) => {
  109. const currentTime = Date.now();
  110. if (e.button === 0 && currentTime - lastLeftClickTime > clickCooldown) {
  111. lastLeftClickTime = currentTime;
  112. leftClickCount++; // Clic izquierdo
  113. }
  114. if (e.button === 2 && currentTime - lastRightClickTime > clickCooldown) {
  115. lastRightClickTime = currentTime;
  116. rightClickCount++; // Clic derecho
  117. }
  118. });
  119.  
  120. // Reiniciar los contadores cada segundo y mostrar los CPS
  121. let leftClickCount = 0;
  122. let rightClickCount = 0;
  123.  
  124. setInterval(() => {
  125. document.getElementById('leftCPS').textContent = `LMB CPS: ${leftClickCount}`;
  126. document.getElementById('rightCPS').textContent = `RMB CPS: ${rightClickCount}`;
  127. leftClickCount = 0;
  128. rightClickCount = 0;
  129. }, 1000);
  130.  
  131. // Crear el menú de configuración
  132. const menu = document.createElement('div');
  133. menu.style.position = 'fixed';
  134. menu.style.top = '50px';
  135. menu.style.left = '50px';
  136. menu.style.backgroundColor = '#000';
  137. menu.style.color = '#fff';
  138. menu.style.padding = '10px';
  139. menu.style.border = '2px solid #fff';
  140. menu.style.borderRadius = '5px';
  141. menu.style.zIndex = '10000';
  142. menu.style.display = 'none';
  143. menu.style.fontFamily = 'Arial, sans-serif';
  144.  
  145. menu.innerHTML = `
  146. <h3>Cube Client - Configuración</h3>
  147. <label><input type="checkbox" id="toggleHitboxes"> Activar Hitboxes</label><br>
  148. <label><input type="checkbox" id="toggleCrosshair"> Activar Crosshair Personalizado</label><br>
  149. <label><input type="checkbox" id="toggleFPSBoost"> Activar FPS Boost</label><br>
  150. <label><input type="checkbox" id="toggleHealthBar"> Activar Barra de Salud</label><br>
  151. <label><input type="checkbox" id="toggleKeystrokes"> Activar Keystrokes</label><br>
  152. <label><input type="checkbox" id="toggleCPSCounter"> Activar Contador de CPS</label><br>
  153. <button id="closeMenu" style="margin-top: 10px;">Cerrar Menú</button>
  154. `;
  155.  
  156. document.body.appendChild(menu);
  157.  
  158. // Eventos para los controles del menú
  159. document.getElementById('toggleHitboxes').addEventListener('change', (e) => {
  160. config.hitboxes = e.target.checked;
  161. });
  162.  
  163. document.getElementById('toggleCrosshair').addEventListener('change', (e) => {
  164. config.customCrosshair = e.target.checked;
  165. });
  166.  
  167. document.getElementById('toggleFPSBoost').addEventListener('change', (e) => {
  168. config.fpsBoost = e.target.checked;
  169. });
  170.  
  171. document.getElementById('toggleHealthBar').addEventListener('change', (e) => {
  172. config.healthBar = e.target.checked;
  173. });
  174.  
  175. document.getElementById('toggleKeystrokes').addEventListener('change', (e) => {
  176. config.keystrokes = e.target.checked;
  177. keystrokesContainer.style.display = config.keystrokes ? 'block' : 'none';
  178. });
  179.  
  180. document.getElementById('toggleCPSCounter').addEventListener('change', (e) => {
  181. config.cpsCounter = e.target.checked;
  182. });
  183.  
  184. document.getElementById('closeMenu').addEventListener('click', () => {
  185. menu.style.display = 'none';
  186. });
  187.  
  188. // Abrir el menú con la tecla "Inicio"
  189. document.addEventListener('keydown', (e) => {
  190. if (e.key === 'Home') {
  191. menu.style.display = menu.style.display === 'none' ? 'block' : 'none';
  192. }
  193. });
  194.  
  195. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址