Josiahiscool73

cloud gaming cheat v1

Apr 2nd, 2025
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.50 KB | None | 0 0
  1. // Virtual Xbox controller (unchanged)
  2. const virtualController = {
  3. axes: [0, 0, 0, 0],
  4. buttons: Array(17).fill({ pressed: false, value: 0 }),
  5. connected: true,
  6. id: "Virtual Xbox Controller (Enhanced)",
  7. index: 0,
  8. timestamp: performance.now(),
  9. mapping: "standard",
  10. vibrationActuator: { type: "dual-rumble", startDelay: 0, strongMagnitude: 0, weakMagnitude: 0 }
  11. };
  12.  
  13. // Controller and aim assist state
  14. let controllerInitialized = false;
  15. let aimAssistEnabled = true;
  16.  
  17. // Enhanced getGamepads override
  18. const originalGetGamepads = navigator.getGamepads;
  19. navigator.getGamepads = function() {
  20. const gamepads = Object.create(Array.prototype);
  21. if (aimAssistEnabled) {
  22. Object.defineProperty(gamepads, '0', { enumerable: true, value: virtualController });
  23. }
  24. for (let i = aimAssistEnabled ? 1 : 0; i < 4; i++) {
  25. Object.defineProperty(gamepads, i.toString(), { enumerable: true, value: null });
  26. }
  27. gamepads.length = 4;
  28. return gamepads;
  29. };
  30.  
  31. // Input variables with smoothing
  32. let moveX = 0, moveY = 0, aimX = 0, aimY = 0;
  33. let targetAimX = 0, targetAimY = 0, currentAimX = 0, currentAimY = 0;
  34. let aimSmoothing = 0.2, aimAcceleration = 1.5;
  35.  
  36. // Toggle states
  37. let ultraLowDelay = false, highBitrate = false, zoomIn = false, crosshairOn = false, speedHack = false;
  38. let zoomOut = false, zoomMore = false, macroEnabled = false, guiVisible = true;
  39.  
  40. // Macro configuration
  41. let editBindKey = null, selectEditBindKey = null;
  42. let configuringMacro = false, waitingForEditBind = false, waitingForSelectEditBind = false, macroActive = false;
  43.  
  44. // GUI setup
  45. const gui = document.createElement('div');
  46. gui.style.cssText = `
  47. position: fixed; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.8); color: white;
  48. padding: 10px; z-index: 9999; font-family: Arial, sans-serif; border-radius: 5px;
  49. box-shadow: 0 0 10px rgba(0,0,0,0.5);
  50. `;
  51. document.body.appendChild(gui);
  52.  
  53. // Mini-indicator
  54. const miniIndicator = document.createElement('div');
  55. miniIndicator.style.cssText = `
  56. position: fixed; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); color: #00ff00;
  57. padding: 5px 10px; z-index: 9999; font-family: Arial, sans-serif; border-radius: 5px;
  58. box-shadow: 0 0 5px rgba(0,0,0,0.5); font-size: 12px; display: none;
  59. `;
  60. miniIndicator.innerHTML = 'Cloud Gaming Cheat [END]';
  61. document.body.appendChild(miniIndicator);
  62.  
  63. // Enhanced crosshair
  64. const enhancedCrosshair = document.createElement('div');
  65. enhancedCrosshair.style.cssText = `
  66. position: fixed; top: 50%; left: 50%; width: 24px; height: 24px;
  67. transform: translate(-50%, -50%); z-index: 9999; pointer-events: none; display: none;
  68. `;
  69. enhancedCrosshair.innerHTML = `
  70. <div style="position:absolute; top:50%; left:0; width:100%; height:2px; background:rgba(0,255,0,0.8); transform:translateY(-50%);"></div>
  71. <div style="position:absolute; top:0; left:50%; width:2px; height:100%; background:rgba(0,255,0,0.8); transform:translateX(-50%);"></div>
  72. <div style="position:absolute; top:50%; left:50%; width:4px; height:4px; background:rgba(255,0,0,0.8); border-radius:50%; transform:translate(-50%, -50%);"></div>
  73. `;
  74. document.body.appendChild(enhancedCrosshair);
  75.  
  76. // Audio setup
  77. let audioContext, gainNode, bassFilter, audioSource;
  78. function setupAudio() {
  79. try {
  80. audioContext = new (window.AudioContext || window.webkitAudioContext)();
  81. gainNode = audioContext.createGain();
  82. gainNode.gain.value = 1;
  83. bassFilter = audioContext.createBiquadFilter();
  84. bassFilter.type = 'lowshelf';
  85. bassFilter.frequency.value = 200;
  86. bassFilter.gain.value = 0;
  87.  
  88. const waitForVideo = setInterval(() => {
  89. const video = document.querySelector('video');
  90. if (video) {
  91. clearInterval(waitForVideo);
  92. audioSource = audioContext.createMediaElementSource(video);
  93. audioSource.connect(gainNode).connect(bassFilter).connect(audioContext.destination);
  94. console.log("Audio hooked to video element successfully.");
  95. }
  96. }, 500);
  97.  
  98. setTimeout(() => {
  99. if (!audioSource && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
  100. console.log("No video found. Attempting tab audio capture...");
  101. navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => {
  102. audioSource = audioContext.createMediaStreamSource(stream);
  103. audioSource.connect(gainNode).connect(bassFilter).connect(audioContext.destination);
  104. console.log("Audio hooked via tab capture.");
  105. }).catch(e => console.error("Tab capture failed:", e));
  106. }
  107. }, 5000);
  108. } catch (e) {
  109. console.error("Audio setup failed:", e);
  110. }
  111. }
  112. setupAudio();
  113.  
  114. // Anti-throttling
  115. const keepAliveAudio = new Audio('data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA=');
  116. keepAliveAudio.loop = true;
  117. keepAliveAudio.volume = 0.01;
  118. function activateKeepAlive() {
  119. if (ultraLowDelay) {
  120. keepAliveAudio.play().catch(e => console.log("Keep-alive audio failed:", e));
  121. if (!window._keepAliveTimer) {
  122. window._keepAliveTimer = setInterval(() => {
  123. document.body.style.opacity = document.body.style.opacity === '0.999' ? '1' : '0.999';
  124. virtualController.timestamp = performance.now();
  125. }, 500);
  126. }
  127. } else {
  128. keepAliveAudio.pause();
  129. if (window._keepAliveTimer) {
  130. clearInterval(window._keepAliveTimer);
  131. window._keepAliveTimer = null;
  132. }
  133. }
  134. }
  135.  
  136. // Toggle GUI visibility
  137. function toggleGUI() {
  138. guiVisible = !guiVisible;
  139. gui.style.display = guiVisible ? 'block' : 'none';
  140. miniIndicator.style.display = guiVisible ? 'none' : 'block';
  141. }
  142.  
  143. // Video styling
  144. function updateVideoStyle() {
  145. const videos = document.querySelectorAll('video');
  146. videos.forEach(video => {
  147. video.style.filter = highBitrate ? 'contrast(115%) saturate(105%) brightness(102%)' : '';
  148. video.style.imageRendering = highBitrate ? 'crisp-edges' : 'auto';
  149. let scale = zoomMore ? 2 : zoomIn ? 1.5 : zoomOut ? 0.75 : 1;
  150. video.style.transform = `scale(${scale})`;
  151. video.style.transition = ultraLowDelay ? 'none' : 'transform 0.1s ease';
  152. video.style.willChange = ultraLowDelay ? 'transform, filter' : 'auto';
  153. video.style.backfaceVisibility = 'hidden';
  154. });
  155. }
  156.  
  157. // Update GUI display
  158. function updateGUIDisplay() {
  159. let macroStatus = macroEnabled ? 'ON' : 'OFF';
  160. if (macroEnabled) {
  161. if (waitingForEditBind) macroStatus = 'Press edit key...';
  162. else if (waitingForSelectEditBind) macroStatus = 'Press select edit key...';
  163. else if (editBindKey && selectEditBindKey) macroStatus = `ON [${editBindKey} + ${selectEditBindKey}]`;
  164. }
  165. gui.innerHTML = `
  166. <h3 style="margin: 0; font-size: 16px; color: #00ff00;">Cloud Gaming Cheat</h3>
  167. <div style="margin: 5px 0; height: 1px; background: rgba(255,255,255,0.3);"></div>
  168. <p>Ultra Low Delay [I]: <span style="color:${ultraLowDelay ? '#00ff00' : '#ff0000'}">${ultraLowDelay ? 'ON' : 'OFF'}</span></p>
  169. <p>Higher Bitrate [O]: <span style="color:${highBitrate ? '#00ff00' : '#ff0000'}">${highBitrate ? 'ON' : 'OFF'}</span></p>
  170. <p>Zoom In [P]: <span style="color:${zoomIn ? '#00ff00' : '#ff0000'}">${zoomIn ? 'ON' : 'OFF'}</span></p>
  171. <p>Zoom Out [L]: <span style="color:${zoomOut ? '#00ff00' : '#ff0000'}">${zoomOut ? 'ON' : 'OFF'}</span></p>
  172. <p>Zoom More [;]: <span style="color:${zoomMore ? '#00ff00' : '#ff0000'}">${zoomMore ? 'ON' : 'OFF'}</span></p>
  173. <p>Crosshair [K]: <span style="color:${crosshairOn ? '#00ff00' : '#ff0000'}">${crosshairOn ? 'ON' : 'OFF'}</span></p>
  174. <p>Speed Hack [U]: <span style="color:${speedHack ? '#00ff00' : '#ff0000'}">${speedHack ? 'ON' : 'OFF'}</span></p>
  175. <p>Controller [J]: <span style="color:${aimAssistEnabled ? '#00ff00' : '#ff0000'}">${aimAssistEnabled ? 'ON' : 'OFF'}</span></p>
  176. <p>Macro [M]: <span style="color:${macroEnabled ? '#00ff00' : '#ff0000'}">${macroStatus}</span></p>
  177. <p>Hold V for Volume Boost</p>
  178. <p style="font-size:12px;color:#aaa">Use G to activate edit macro</p>
  179. <p style="font-size:12px;color:#aaa">Press END to toggle this UI</p>
  180. `;
  181. }
  182.  
  183. // Controller state update
  184. function updateController() {
  185. virtualController.timestamp = performance.now();
  186. if (Math.abs(targetAimX - currentAimX) > 0.01 || Math.abs(targetAimY - currentAimY) > 0.01) {
  187. const distX = targetAimX - currentAimX, distY = targetAimY - currentAimY;
  188. const accelX = Math.sign(distX) * Math.min(Math.abs(distX) * aimAcceleration, Math.abs(distX));
  189. const accelY = Math.sign(distY) * Math.min(Math.abs(distY) * aimAcceleration, Math.abs(distY));
  190. currentAimX += accelX * aimSmoothing;
  191. currentAimY += accelY * aimSmoothing;
  192. }
  193. virtualController.axes[0] = moveX;
  194. virtualController.axes[1] = moveY;
  195. virtualController.axes[2] = currentAimX;
  196. virtualController.axes[3] = currentAimY;
  197. if (aimAssistEnabled && !controllerInitialized) initializeController();
  198. }
  199.  
  200. // Controller initialization
  201. function initializeController() {
  202. const connectEvent = new Event('gamepadconnected');
  203. Object.defineProperty(connectEvent, 'gamepad', { value: virtualController });
  204. window.dispatchEvent(connectEvent);
  205. controllerInitialized = true;
  206. console.log("Controller initialized.");
  207. }
  208.  
  209. // Faster macro with keyboard/mouse inputs
  210. function executeMacro() {
  211. if (!macroEnabled || !editBindKey || !selectEditBindKey) return;
  212. console.log("Executing fast macro with Edit:", editBindKey, "Select:", selectEditBindKey);
  213.  
  214. const targetElement = document.activeElement || document.body;
  215.  
  216. // Simulate Edit key press
  217. const editDown = new KeyboardEvent('keydown', {
  218. key: editBindKey,
  219. code: `Key${editBindKey.toUpperCase()}`,
  220. keyCode: editBindKey.toUpperCase().charCodeAt(0),
  221. bubbles: true,
  222. cancelable: true
  223. });
  224. targetElement.dispatchEvent(editDown);
  225.  
  226. setTimeout(() => {
  227. // Simulate Select key press
  228. const selectDown = new KeyboardEvent('keydown', {
  229. key: selectEditBindKey,
  230. code: `Key${selectEditBindKey.toUpperCase()}`,
  231. keyCode: selectEditBindKey.toUpperCase().charCodeAt(0),
  232. bubbles: true,
  233. cancelable: true
  234. });
  235. targetElement.dispatchEvent(selectDown);
  236.  
  237. // Fallback mouse click for Confirm
  238. const clickEvent = new MouseEvent('click', {
  239. button: 0,
  240. buttons: 1,
  241. clientX: window.innerWidth / 2,
  242. clientY: window.innerHeight / 2,
  243. bubbles: true,
  244. cancelable: true
  245. });
  246. targetElement.dispatchEvent(clickEvent);
  247.  
  248. setTimeout(() => {
  249. // Release keys
  250. const editUp = new KeyboardEvent('keyup', {
  251. key: editBindKey,
  252. code: `Key${editBindKey.toUpperCase()}`,
  253. keyCode: editBindKey.toUpperCase().charCodeAt(0),
  254. bubbles: true,
  255. cancelable: true
  256. });
  257. const selectUp = new KeyboardEvent('keyup', {
  258. key: selectEditBindKey,
  259. code: `Key${selectEditBindKey.toUpperCase()}`,
  260. keyCode: selectEditBindKey.toUpperCase().charCodeAt(0),
  261. bubbles: true,
  262. cancelable: true
  263. });
  264. targetElement.dispatchEvent(editUp);
  265. targetElement.dispatchEvent(selectUp);
  266. console.log("Fast macro completed.");
  267. }, 20); // Faster hold duration
  268. }, 10); // Faster delay between Edit and Select
  269. }
  270.  
  271. // Macro configuration
  272. function configureMacro() {
  273. if (!macroEnabled) return;
  274. if (!editBindKey) {
  275. waitingForEditBind = true;
  276. waitingForSelectEditBind = false;
  277. updateGUIDisplay();
  278. return;
  279. }
  280. if (!selectEditBindKey) {
  281. waitingForEditBind = false;
  282. waitingForSelectEditBind = true;
  283. updateGUIDisplay();
  284. return;
  285. }
  286. waitingForEditBind = false;
  287. waitingForSelectEditBind = false;
  288. updateGUIDisplay();
  289. }
  290.  
  291. // Input handler
  292. let lastInputTime = 0;
  293. const debounceDelay = 5;
  294. document.addEventListener('keydown', (e) => {
  295. const now = performance.now();
  296. if (now - lastInputTime < debounceDelay) return;
  297. lastInputTime = now;
  298.  
  299. if (e.key === 'End') {
  300. toggleGUI();
  301. e.preventDefault();
  302. return;
  303. }
  304.  
  305. if (waitingForEditBind) {
  306. editBindKey = e.key.toLowerCase();
  307. configureMacro();
  308. e.preventDefault();
  309. return;
  310. }
  311. if (waitingForSelectEditBind) {
  312. selectEditBindKey = e.key.toLowerCase();
  313. configureMacro();
  314. e.preventDefault();
  315. return;
  316. }
  317.  
  318. if (e.key.toLowerCase() === 'g' && macroEnabled && editBindKey && selectEditBindKey) {
  319. macroActive = true;
  320. executeMacro();
  321. e.preventDefault();
  322. return;
  323. }
  324.  
  325. e.preventDefault();
  326. switch (e.key.toLowerCase()) {
  327. case 'w': moveY = -1; break;
  328. case 's': moveY = 1; break;
  329. case 'a': moveX = -1; break;
  330. case 'd': moveX = 1; break;
  331. case 'shift': virtualController.buttons[10].pressed = true; virtualController.buttons[10].value = 1; break;
  332. case 't': virtualController.buttons[6].pressed = true; virtualController.buttons[6].value = 1; break;
  333. case 'arrowup': targetAimY = -1; break;
  334. case 'arrowdown': targetAimY = 1; break;
  335. case 'arrowleft': targetAimX = -1; break;
  336. case 'arrowright': targetAimX = 1; break;
  337. case ' ': virtualController.buttons[7].pressed = true; virtualController.buttons[7].value = 1; break;
  338. case 'v':
  339. if (gainNode && bassFilter) {
  340. gainNode.gain.value = 2.5;
  341. bassFilter.gain.value = 15;
  342. console.log("Volume Boost + Bass ON");
  343. } else {
  344. console.log("Audio not hooked yet.");
  345. }
  346. break;
  347. case 'i': ultraLowDelay = !ultraLowDelay; activateKeepAlive(); updateVideoStyle(); updateGUIDisplay(); break;
  348. case 'o': highBitrate = !highBitrate; updateVideoStyle(); updateGUIDisplay(); break;
  349. case 'p': zoomIn = !zoomIn; if (zoomIn) { zoomOut = false; zoomMore = false; } updateVideoStyle(); updateGUIDisplay(); break;
  350. case 'l': zoomOut = !zoomOut; if (zoomOut) { zoomIn = false; zoomMore = false; } updateVideoStyle(); updateGUIDisplay(); break;
  351. case ';': zoomMore = !zoomMore; if (zoomMore) { zoomIn = false; zoomOut = false; } updateVideoStyle(); updateGUIDisplay(); break;
  352. case 'k': crosshairOn = !crosshairOn; enhancedCrosshair.style.display = crosshairOn ? 'block' : 'none'; updateGUIDisplay(); break;
  353. case 'u': speedHack = !speedHack; document.querySelectorAll('video').forEach(v => v.playbackRate = speedHack ? 1.5 : 1); updateGUIDisplay(); break;
  354. case 'j':
  355. aimAssistEnabled = !aimAssistEnabled;
  356. if (!aimAssistEnabled && controllerInitialized) {
  357. const disconnectEvent = new Event('gamepaddisconnected');
  358. Object.defineProperty(disconnectEvent, 'gamepad', { value: virtualController });
  359. window.dispatchEvent(disconnectEvent);
  360. controllerInitialized = false;
  361. }
  362. updateGUIDisplay();
  363. break;
  364. case 'm':
  365. macroEnabled = !macroEnabled;
  366. if (macroEnabled) { editBindKey = null; selectEditBindKey = null; configureMacro(); } else { waitingForEditBind = false; waitingForSelectEditBind = false; }
  367. updateGUIDisplay();
  368. break;
  369. }
  370. updateController();
  371. });
  372.  
  373. document.addEventListener('keyup', (e) => {
  374. const now = performance.now();
  375. if (now - lastInputTime < debounceDelay) return;
  376. lastInputTime = now;
  377.  
  378. if (e.key.toLowerCase() === 'g' && macroActive) macroActive = false;
  379.  
  380. e.preventDefault();
  381. switch (e.key.toLowerCase()) {
  382. case 'w': case 's': moveY = 0; break;
  383. case 'a': case 'd': moveX = 0; break;
  384. case 'shift': virtualController.buttons[10].pressed = false; virtualController.buttons[10].value = 0; break;
  385. case 't': virtualController.buttons[6].pressed = false; virtualController.buttons[6].value = 0; break;
  386. case 'arrowup': case 'arrowdown': targetAimY = 0; break;
  387. case 'arrowleft': case 'arrowright': targetAimX = 0; break;
  388. case ' ': virtualController.buttons[7].pressed = false; virtualController.buttons[7].value = 0; break;
  389. case 'v':
  390. if (gainNode && bassFilter) {
  391. gainNode.gain.value = 1;
  392. bassFilter.gain.value = 0;
  393. console.log("Volume Boost + Bass OFF");
  394. }
  395. break;
  396. }
  397. updateController();
  398. });
  399.  
  400. // Update loop
  401. let lastUpdateTime = 0;
  402. function updateLoop(timestamp) {
  403. const timeDelta = timestamp - lastUpdateTime;
  404. const updateInterval = ultraLowDelay ? 4 : 16;
  405. if (timeDelta >= updateInterval) {
  406. lastUpdateTime = timestamp;
  407. updateController();
  408. }
  409. requestAnimationFrame(updateLoop);
  410. }
  411.  
  412. // Initialize
  413. updateGUIDisplay();
  414. requestAnimationFrame(updateLoop);
  415. console.log("Cloud Gaming Cheat with faster keyboard/mouse macro active.");
Add Comment
Please, Sign In to add comment