Galaxy Client

Replacement for infinite client

  1. // ==UserScript==
  2. // @name Galaxy Client
  3. // @namespace ZXM
  4. // @version 1.2
  5. // @description Replacement for infinite client
  6. // @author JustGyrops
  7. // @match https://bloxd.io/
  8. // @icon https://staging.bloxd.io
  9. // @updateURL
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. alert ( "Download Complete!!")
  15. alert ("made by JustGyrops")
  16. alert ("Thank you for using galaxy client. Enjoy!!")
  17. var container = document.createElement('div');
  18. container.style.position = 'fixed';
  19. container.style.bottom = '10px';
  20. container.style.left = '10px';
  21. container.style.backgroundColor = 'transparent';
  22. container.style.color = 'black';
  23. container.style.padding = '5px';
  24. container.style.fontFamily = 'Arial';
  25. container.style.fontSize = '14px';
  26. container.style.zIndex = '9999';
  27.  
  28. var row1 = document.createElement('div');
  29. row1.style.display = 'flex';
  30. row1.style.justifyContent = 'center';
  31.  
  32. var upKey = createKeyElement('W');
  33.  
  34. var row2 = document.createElement('div');
  35. row2.style.display = 'flex';
  36. row2.style.justifyContent = 'center';
  37.  
  38. var leftKey = createKeyElement('A');
  39. var sprintKey = createKeyElement('S');
  40. var rightKey = createKeyElement('D');
  41.  
  42. var row3 = document.createElement('div');
  43. row3.style.display = 'flex';
  44. row3.style.justifyContent = 'center';
  45.  
  46. var shiftKey = createKeyElement('Shift');
  47. var spaceKey = createKeyElement(' Space ');
  48.  
  49. var row4 = document.createElement('div');
  50. row4.style.display = 'flex';
  51. row4.style.justifyContent = 'center';
  52.  
  53. var lmbKey = createKeyElement('LMB');
  54. var rmbKey = createKeyElement('RMB');
  55.  
  56. row1.appendChild(upKey);
  57. row2.appendChild(leftKey);
  58. row2.appendChild(sprintKey);
  59. row2.appendChild(rightKey);
  60. row3.appendChild(shiftKey);
  61. row3.appendChild(spaceKey);
  62. row4.appendChild(lmbKey);
  63. row4.appendChild(rmbKey);
  64. container.appendChild(row1);
  65. container.appendChild(row2);
  66. container.appendChild(row3);
  67. container.appendChild(row4);
  68.  
  69. document.body.appendChild(container);
  70.  
  71. var cpsButton = document.createElement('div');
  72. cpsButton.style.position = 'fixed';
  73. cpsButton.style.top = '10px';
  74. cpsButton.style.right = '10px';
  75. cpsButton.style.backgroundColor = 'white';
  76. cpsButton.style.color = 'black';
  77. cpsButton.style.padding = '5px';
  78. cpsButton.style.fontFamily = 'Arial';
  79. cpsButton.style.fontSize = '14px';
  80. cpsButton.style.zIndex = '9999';
  81. cpsButton.textContent = '';
  82.  
  83. var cpsLabel = document.createElement('span');
  84. cpsLabel.textContent = 'CPS: ';
  85. var cpsValue = document.createElement('span');
  86. cpsValue.textContent = '0';
  87.  
  88. cpsButton.appendChild(cpsLabel);
  89. cpsButton.appendChild(cpsValue);
  90. document.body.appendChild(cpsButton);
  91.  
  92. cpsButton.addEventListener('click', function () {
  93. resetClickCount();
  94. });
  95.  
  96. var clickTimes = [];
  97.  
  98. document.addEventListener('keydown', function (event) {
  99. highlightKey(event.key, 'white');
  100. });
  101.  
  102. document.addEventListener('keyup', function (event) {
  103. highlightKey(event.key, 'white');
  104. });
  105.  
  106. document.addEventListener('mousedown', function (event) {
  107. if (event.button === 0) {
  108. lmbKey.style.backgroundColor = 'white';
  109. countClick();
  110. } else if (event.button === 2) {
  111. rmbKey.style.backgroundColor = 'white';
  112. }
  113. });
  114.  
  115. document.addEventListener('mouseup', function (event) {
  116. if (event.button === 0) {
  117. lmbKey.style.backgroundColor = 'white';
  118. } else if (event.button === 2) {
  119. rmbKey.style.backgroundColor = 'white';
  120. }
  121. });
  122.  
  123. function createKeyElement(keyText) {
  124. var keyElement = document.createElement('div');
  125. keyElement.style.backgroundColor = 'transparent';
  126. keyElement.style.color = 'black';
  127. keyElement.style.padding = '9px';
  128. keyElement.style.margin = '5px';
  129. keyElement.style.border = '3px solid green';
  130. keyElement.style.borderRadius = '9px';
  131. keyElement.style.fontFamily = 'Arial';
  132. keyElement.style.fontSize = '14px';
  133. keyElement.textContent = keyText;
  134. return keyElement;
  135. }
  136.  
  137. function highlightKey(key, color) {
  138. switch (key) {
  139. case 'w':
  140. upKey.style.backgroundColor = color;
  141. break;
  142. case 'a':
  143. leftKey.style.backgroundColor = color;
  144. break;
  145. case 's':
  146. sprintKey.style.backgroundColor = color;
  147. break;
  148. case 'd':
  149. rightKey.style.backgroundColor = color;
  150. break;
  151. case 'Shift':
  152. shiftKey.style.backgroundColor = color;
  153. break;
  154. case ' ':
  155. spaceKey.style.backgroundColor = color;
  156. break;
  157. default:
  158. break;
  159. }
  160. }
  161.  
  162. function countClick() {
  163. var currentTime = new Date().getTime();
  164. clickTimes.push(currentTime);
  165. updateCPS();
  166. }
  167.  
  168. function updateCPS() {
  169. var currentTime = new Date().getTime();
  170. var oneSecondAgo = currentTime - 1000;
  171. var count = 0;
  172.  
  173.  
  174. for (var i = clickTimes.length - 1; i >= 0; i--) {
  175. if (clickTimes[i] >= oneSecondAgo) {
  176. count++;
  177. } else {
  178. break;
  179. }
  180. }
  181.  
  182. cpsValue.textContent = count;
  183. }
  184.  
  185. function resetClickCount() {
  186. clickTimes = [];
  187. updateCPS();
  188.  
  189. }
  190.  
  191. })();
  192. setInterval(function() {
  193. const crosshair = document.querySelector(".CrossHair");
  194. if (crosshair) {
  195. crosshair.textContent = "";
  196. crosshair.style.backgroundImage = "url(https://piskel-imgstore-b.appspot.com/img/1af89691-ac17-11ef-9afd-95c736b782b2.gif)";
  197. crosshair.style.backgroundRepeat = "no-repeat";
  198. crosshair.style.backgroundSize = "contain";
  199. crosshair.style.width = "20px";
  200. crosshair.style.height = "20px";
  201. }
  202. }, 1000);

QingJ © 2025

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