Greasy Fork 支持简体中文。

Cryzen.io

Todos em um: Models, Anti-recoil, ESP, Rewards, Performance

  1. // ==UserScript==
  2. // @name Cryzen.io
  3. // @description Todos em um: Models, Anti-recoil, ESP, Rewards, Performance
  4. // @version 1.0.2
  5. // @match https://cryzen.io/*
  6. // @icon https://www.google.com/s2/favicons?sz=64&domain=cryzen.io
  7. // @author _PeDeCoca
  8. // @grant none
  9. // @run-at document-start
  10. // @license MIT
  11. // @namespace PeDeCoca
  12. // ==/UserScript==
  13.  
  14. // Utility functions
  15. const { log, debug, warn, error } = console;
  16.  
  17. // Model visibility enhancement
  18. const srcset = Object.getOwnPropertyDescriptor(Image.prototype, 'src').set;
  19. function getSqareDataURL(width, height, color) {
  20. const canvas = document.createElement('canvas');
  21. canvas.width = width;
  22. canvas.height = height;
  23. const context = canvas.getContext('2d');
  24. context.fillStyle = color;
  25. context.fillRect(0, 0, width, height);
  26. return canvas.toDataURL();
  27. }
  28.  
  29. Object.defineProperty(Image.prototype, 'src', {
  30. set(value) {
  31. this._src = value;
  32. if (typeof value != 'string') return srcset.call(this, value);
  33. if (value.includes('colorMap')) {
  34. if (value.toLowerCase().includes('red')) {
  35. value = getSqareDataURL(1000, 1000, '#FF7373');
  36. } else if (value.toLowerCase().includes('blue')) {
  37. value = getSqareDataURL(1000, 1000, '#00FFFF');
  38. } else {
  39. value = getSqareDataURL(1000, 1000, '#73FF73');
  40. }
  41. }
  42. if (value.includes('map-')) {
  43. value = getSqareDataURL(4096, 2048, '#AAAAAA');
  44. }
  45. srcset.call(this, value);
  46. },
  47. get() { return this._src; }
  48. });
  49.  
  50. // No spread and anti-recoil
  51. const _random = Math.random;
  52. Object.defineProperty(Math, 'random', {
  53. set(value) { _random = value; },
  54. get() {
  55. try {
  56. throw new Error();
  57. } catch (error) {
  58. if (error.stack.includes('shoot')) return _=>.5;
  59. }
  60. return _random;
  61. }
  62. });
  63.  
  64. // Player ESP with wireframe
  65. Object.defineProperty(Object.prototype, 'material', {
  66. get() { return this._material; },
  67. set(v) {
  68. if (this.type === 'SkinnedMesh' && this?.skeleton) {
  69. Object.defineProperties(v, {
  70. 'depthTest': {
  71. get() { return false; },
  72. set(v) {},
  73. },
  74. 'transparent': {
  75. get() { return true; },
  76. set(v) {},
  77. }
  78. });
  79. v.wireframe = true;
  80. v.opacity = 1;
  81. }
  82. this._material = v;
  83. }
  84. });
  85.  
  86. // Add tracking system
  87. function setupModelTracking() {
  88. const playerTracker = {
  89. enabled: false,
  90. players: new Set(),
  91. nearestPlayer: null,
  92. highlightColor: new Color(1, 0, 0) // vermelho
  93. };
  94.  
  95. // Observer para detectar jogadores
  96. const observer = new MutationObserver((mutations) => {
  97. mutations.forEach(mutation => {
  98. mutation.addedNodes.forEach(node => {
  99. if (node.classList?.contains('player-model')) {
  100. playerTracker.players.add(node);
  101. }
  102. });
  103. });
  104. });
  105.  
  106. // Adicionar toggle no menu
  107. function addTrackingToggle() {
  108. const container = document.querySelector('.toggle-container');
  109. const label = document.createElement('label');
  110. label.innerHTML = `
  111. <input type="checkbox" id="toggle-tracking"> Target Track
  112. `;
  113. container.appendChild(label);
  114.  
  115. document.getElementById('toggle-tracking').onchange = (e) => {
  116. playerTracker.enabled = e.target.checked;
  117. if (!e.target.checked) {
  118. // Limpar highlights quando desativado
  119. playerTracker.players.forEach(player => {
  120. if (player?.material) {
  121. player.material.emissive = new Color(0, 0, 0);
  122. }
  123. });
  124. }
  125. };
  126. }
  127.  
  128. // Update loop melhorado
  129. function trackerLoop() {
  130. if (!playerTracker.enabled) return;
  131.  
  132. const center = {
  133. x: window.innerWidth / 2,
  134. y: window.innerHeight / 2
  135. };
  136.  
  137. let closest = null;
  138. let minDistance = Infinity;
  139.  
  140. // Limpar highlight anterior
  141. if (playerTracker.nearestPlayer?.material) {
  142. playerTracker.nearestPlayer.material.emissive = new Color(0, 0, 0);
  143. }
  144.  
  145. // Encontrar jogador mais próximo
  146. document.querySelectorAll('.player-model').forEach(player => {
  147. if (!player.isConnected) return;
  148.  
  149. const rect = player.getBoundingClientRect();
  150. if (!rect.width || !rect.height) return;
  151.  
  152. const distance = Math.hypot(
  153. center.x - (rect.left + rect.width / 2),
  154. center.y - (rect.top + rect.height / 2)
  155. );
  156.  
  157. if (distance < minDistance) {
  158. minDistance = distance;
  159. closest = player;
  160. }
  161. });
  162.  
  163. // Destacar novo alvo
  164. if (closest?.material) {
  165. closest.material.emissive = playerTracker.highlightColor;
  166. playerTracker.nearestPlayer = closest;
  167.  
  168. if (config.debug) {
  169. console.log('[Target Track] Found:', {
  170. distance: minDistance,
  171. element: closest
  172. });
  173. }
  174. }
  175.  
  176. requestAnimationFrame(trackerLoop);
  177. }
  178.  
  179. // Inicializar
  180. observer.observe(document.body, {
  181. childList: true,
  182. subtree: true
  183. });
  184. addTrackingToggle();
  185. trackerLoop();
  186.  
  187. return playerTracker;
  188. }
  189.  
  190. // Free rewards system
  191. function skipRewardedBreak() {
  192. return new Promise(resolve => resolve(true));
  193. }
  194.  
  195. Object.defineProperties(Object.prototype, {
  196. 'rewardedBreak': {
  197. get() { return skipRewardedBreak.bind(this); },
  198. set() {},
  199. enumerable: false,
  200. },
  201. 'gameanalytics': {
  202. get() {
  203. return {
  204. GameAnalytics: {
  205. addAdEvent: () => {},
  206. }
  207. // ...existing gameanalytics mock...
  208. };
  209. },
  210. set(v) {},
  211. enumerable: false,
  212. }
  213. });
  214.  
  215. // Enhanced menu system
  216. (function() {
  217. // Add config object with blocked domains
  218. const config = {
  219. active: true,
  220. autoReward: true,
  221. debug: true,
  222. noSpread: true, // Ativo por padrão
  223. esp: true, // Ativo por padrão
  224. blockedDomains: new Set([
  225. 'poki.com',
  226. 'poki-gdn.com',
  227. 'google-analytics.com',
  228. 'doubleclick.net',
  229. 'adservice.google.com',
  230. 'analytics.google.com',
  231. 'pagead2.googlesyndication.com',
  232. 'googleads.g.doubleclick.net',
  233. 'partner.googleadservices.com',
  234. 'tpc.googlesyndication.com',
  235. 'google.com/pagead',
  236. 'google.com/adsense',
  237. 'advertising.com',
  238. 'adnxs.com',
  239. 'adsense.google.com'
  240. ])
  241. };
  242.  
  243. // Add ad blocking functions
  244. const originalFetch = window.fetch;
  245. window.fetch = async function(...args) {
  246. try {
  247. const url = new URL(args[0]);
  248. if (config.blockedDomains.has(url.hostname)) {
  249. if (config.debug) console.log('[AdBlock] Blocked fetch:', url.hostname);
  250. return new Response('', { status: 200 });
  251. }
  252. } catch {}
  253. return originalFetch.apply(this, arguments);
  254. };
  255.  
  256. const originalXHR = window.XMLHttpRequest;
  257. window.XMLHttpRequest = function() {
  258. const xhr = new originalXHR();
  259. const originalOpen = xhr.open;
  260. xhr.open = function(method, url) {
  261. try {
  262. const urlObj = new URL(url);
  263. if (config.blockedDomains.has(urlObj.hostname)) {
  264. if (config.debug) console.log('[AdBlock] Blocked XHR:', urlObj.hostname);
  265. return;
  266. }
  267. } catch {}
  268. return originalOpen.apply(this, arguments);
  269. };
  270. return xhr;
  271. };
  272.  
  273. // Block ads on document level
  274. function removeAdsElements() {
  275. const adSelectors = [
  276. 'ins.adsbygoogle',
  277. 'div[id*="google_ads"]',
  278. 'div[id*="advertisement"]',
  279. 'div[class*="ad-"]',
  280. 'div[class*="ads-"]',
  281. 'iframe[src*="googlead"]',
  282. 'iframe[src*="doubleclick"]',
  283. 'div[aria-label*="Advertisement"]'
  284. ];
  285.  
  286. const observer = new MutationObserver((mutations) => {
  287. for (const selector of adSelectors) {
  288. document.querySelectorAll(selector).forEach(ad => {
  289. ad.remove();
  290. if (config.debug) console.log('[AdBlock] Removed ad element:', selector);
  291. });
  292. }
  293. });
  294.  
  295. observer.observe(document.body, {
  296. childList: true,
  297. subtree: true
  298. });
  299. }
  300.  
  301. // Override window.open to block popup ads
  302. const originalWindowOpen = window.open;
  303. window.open = function(url, ...args) {
  304. try {
  305. const urlObj = new URL(url);
  306. if (config.blockedDomains.has(urlObj.hostname)) {
  307. if (config.debug) console.log('[AdBlock] Blocked popup:', url);
  308. return null;
  309. }
  310. } catch {}
  311. return originalWindowOpen.apply(this, arguments);
  312. };
  313.  
  314. const styles = `
  315. #hack-menu {
  316. position: fixed;
  317. top: 50px;
  318. left: 10px;
  319. background: rgba(0,0,0,0.8);
  320. color: #00ff00;
  321. padding: 15px;
  322. border-radius: 10px;
  323. z-index: 9999;
  324. width: 200px;
  325. font-family: Arial, sans-serif;
  326. border: 2px solid #00ff00;
  327. cursor: move;
  328. animation: rainbow 2s infinite;
  329. user-select: none;
  330. }
  331. #hack-menu h3 {
  332. text-align: center;
  333. margin-bottom: 10px;
  334. color: #00ff00;
  335. display: flex;
  336. justify-content: center;
  337. align-items: center;
  338. position: relative;
  339. }
  340. .minimize-btn {
  341. position: absolute;
  342. top: 5px;
  343. right: 5px;
  344. background: none;
  345. border: none;
  346. color: #00ff00;
  347. cursor: pointer;
  348. font-size: 16px;
  349. padding: 5px;
  350. }
  351. .toggle-container {
  352. display: flex;
  353. flex-direction: column;
  354. gap: 10px;
  355. margin: 15px 0;
  356. }
  357. .toggle-container label {
  358. display: flex;
  359. align-items: center;
  360. gap: 8px;
  361. color: #00ff00;
  362. cursor: pointer;
  363. }
  364. .button-container {
  365. display: flex;
  366. flex-direction: column;
  367. gap: 5px;
  368. }
  369. .control-btn {
  370. background-color: #333;
  371. border: 1px solid #00ff00;
  372. color: #00ff00;
  373. padding: 8px;
  374. cursor: pointer;
  375. border-radius: 5px;
  376. width: 100%;
  377. }
  378. .control-btn:hover {
  379. background-color: #444;
  380. }
  381. @keyframes rainbow {
  382. 0% { border-color: red; }
  383. 33% { border-color: #00ff00; }
  384. 66% { border-color: blue; }
  385. 100% { border-color: red; }
  386. }
  387. .floating-icon {
  388. position: fixed;
  389. top: 50px;
  390. left: 10px;
  391. width: 40px;
  392. height: 40px;
  393. background: rgba(0,0,0,0);
  394. border-radius: 50%;
  395. display: none;
  396. justify-content: center;
  397. align-items: center;
  398. cursor: pointer;
  399. z-index: 9999;
  400. border: 2px solid #00ff00;
  401. animation: rainbow 2s infinite;
  402. }
  403. .discord-icon {
  404. width: 50px;
  405. height: 50px;
  406. margin-left: 10px;
  407. transition: transform 0.2s;
  408. }
  409. .discord-icon:hover {
  410. transform: scale(1.2);
  411. }
  412. `;
  413.  
  414. function createMenu() {
  415. const menu = document.createElement('div');
  416. menu.id = 'hack-menu';
  417. menu.innerHTML = `
  418. <button class="minimize-btn">−</button>
  419. <h3>
  420. <span>_PeDeCoca</span>
  421. <a href="https://discord.gg/RWjQcR6f5T" target="_blank">
  422. <img src="https://img.icons8.com/?size=100&id=61604&format=png&color=000000" alt="Discord" class="discord-icon">
  423. </a>
  424. </h3>
  425.  
  426. <div class="toggle-container">
  427. <label>
  428. <input type="checkbox" id="toggle-esp" checked> ESP Vision
  429. </label>
  430. <label>
  431. <input type="checkbox" id="toggle-nospread" checked> No Spread
  432. </label>
  433. <label>
  434. <input type="checkbox" id="toggle-rewards" checked> Auto Rewards
  435. </label>
  436. </div>
  437.  
  438. <div class="button-container">
  439. <button class="control-btn" id="quality-high">High Graphics</button>
  440. <button class="control-btn" id="quality-medium">Medium Graphics</button>
  441. <button class="control-btn" id="quality-low">Low Graphics</button>
  442. </div>
  443.  
  444. <button id="reset-all" class="control-btn" style="margin-top: 15px">Reset All</button>
  445. `;
  446.  
  447. const floatingIcon = document.createElement('div');
  448. floatingIcon.className = 'floating-icon';
  449. floatingIcon.innerHTML = '👹';
  450.  
  451. document.body.appendChild(menu);
  452. document.body.appendChild(floatingIcon);
  453.  
  454. setupControls();
  455. makeMenuDraggable(menu, floatingIcon);
  456. }
  457.  
  458. // Add graphics quality functions
  459. function setGraphicsQuality(quality) {
  460. switch(quality) {
  461. case 'High':
  462. resetGraphics();
  463. break;
  464. case 'Medium':
  465. applyMediumGraphics();
  466. break;
  467. case 'Low':
  468. applyLowGraphics();
  469. break;
  470. }
  471. }
  472.  
  473. function resetGraphics() {
  474. document.querySelectorAll('.map-element').forEach(element => {
  475. element.style.removeProperty('backgroundColor');
  476. element.style.removeProperty('opacity');
  477. element.style.removeProperty('border');
  478. });
  479. // Reset skybox and other elements
  480. const skybox = document.querySelector('.skybox');
  481. if (skybox) skybox.style.display = 'block';
  482. }
  483.  
  484. function applyMediumGraphics() {
  485. document.querySelectorAll('.map-element').forEach(element => {
  486. element.style.opacity = '0.8';
  487. element.style.backgroundColor = '#444';
  488. });
  489. }
  490.  
  491. function applyLowGraphics() {
  492. // Remove skybox
  493. const skybox = document.querySelector('.skybox');
  494. if (skybox) skybox.style.display = 'none';
  495.  
  496. // Simplify map elements
  497. document.querySelectorAll('.map-element').forEach(element => {
  498. element.style.backgroundColor = 'gray';
  499. element.style.opacity = '0.5';
  500. element.style.border = 'none';
  501. });
  502. }
  503.  
  504. // Remover antigas tentativas de controle de cor e opacidade no setupControls
  505. function setupControls() {
  506. document.getElementById('toggle-esp').onchange = (e) => {
  507. const enabled = e.target.checked;
  508. // Toggle ESP visibility with wireframe
  509. document.querySelectorAll('.player-model').forEach(player => {
  510. if (player?.material) {
  511. player.material.depthTest = !enabled;
  512. player.material.transparent = enabled;
  513. player.material.wireframe = enabled;
  514. player.material.opacity = 1;
  515. }
  516. });
  517. };
  518.  
  519. document.getElementById('toggle-nospread').onchange = (e) => {
  520. // Toggle no spread functionality
  521. config.noSpread = e.target.checked;
  522. };
  523.  
  524. document.getElementById('toggle-rewards').onchange = (e) => {
  525. config.autoReward = e.target.checked;
  526. };
  527.  
  528. // Graphics quality buttons
  529. document.getElementById('quality-high').onclick = () => setGraphicsQuality('High');
  530. document.getElementById('quality-medium').onclick = () => setGraphicsQuality('Medium');
  531. document.getElementById('quality-low').onclick = () => setGraphicsQuality('Low');
  532.  
  533. // Reset button with proper graphics reset
  534. document.getElementById('reset-all').onclick = () => {
  535. // Reset all toggles
  536. document.querySelectorAll('input[type="checkbox"]').forEach(cb => cb.checked = false);
  537.  
  538. // Reset configurations
  539. config.autoReward = false;
  540. config.noSpread = false;
  541.  
  542. // Reset graphics to high quality
  543. setGraphicsQuality('High');
  544.  
  545. // Additional resets if needed
  546. resetGraphics();
  547. };
  548.  
  549. // Minimize button
  550. const menu = document.getElementById('hack-menu');
  551. const floatingIcon = document.querySelector('.floating-icon');
  552. const minimizeBtn = menu.querySelector('.minimize-btn');
  553.  
  554. minimizeBtn.onclick = () => {
  555. menu.style.display = 'none';
  556. floatingIcon.style.display = 'flex';
  557. };
  558.  
  559. floatingIcon.onclick = () => {
  560. menu.style.display = 'block';
  561. floatingIcon.style.display = 'none';
  562. };
  563. }
  564.  
  565. function makeMenuDraggable(menu, floatingIcon) {
  566. [menu, floatingIcon].forEach(element => {
  567. let isDragging = false;
  568. let currentX;
  569. let currentY;
  570. let initialX;
  571. let initialY;
  572.  
  573. element.addEventListener('mousedown', (e) => {
  574. if (e.target.tagName === 'BUTTON' || e.target.tagName === 'INPUT') return;
  575.  
  576. isDragging = true;
  577. initialX = e.clientX - element.offsetLeft;
  578. initialY = e.clientY - element.offsetTop;
  579. });
  580.  
  581. document.addEventListener('mousemove', (e) => {
  582. if (!isDragging) return;
  583.  
  584. e.preventDefault();
  585. currentX = e.clientX - initialX;
  586. currentY = e.clientY - initialY;
  587.  
  588. element.style.left = `${currentX}px`;
  589. element.style.top = `${currentY}px`;
  590. });
  591.  
  592. document.addEventListener('mouseup', () => {
  593. isDragging = false;
  594. });
  595. });
  596. }
  597.  
  598. // Initialize everything
  599. function initialize() {
  600. const styleSheet = document.createElement('style');
  601. styleSheet.textContent = styles + `
  602. .adsbygoogle { display: none !important; }
  603. [class*="advertisement"] { display: none !important; }
  604. [id*="google_ads"] { display: none !important; }
  605. `;
  606. document.head.appendChild(styleSheet);
  607.  
  608. createMenu();
  609. removeAdsElements();
  610.  
  611. // Inicializar tudo em ordem correta
  612. window.playerTracker = setupModelTracking();
  613.  
  614. // Ativar todas as funcionalidades por padrão
  615. setTimeout(() => {
  616. // Ativar ESP
  617. document.querySelectorAll('.player-model').forEach(player => {
  618. if (player?.material) {
  619. player.material.depthTest = false;
  620. player.material.transparent = true;
  621. }
  622. });
  623.  
  624. // Ativar No Spread
  625. config.noSpread = true;
  626.  
  627. // Ativar Auto Rewards
  628. config.autoReward = true;
  629.  
  630. // Aplicar qualidade gráfica baixa por padrão
  631. setGraphicsQuality('Low');
  632. }, 1000); // Pequeno delay para garantir que tudo foi carregado
  633.  
  634. // Adicionar sistema de tracking
  635. setupModelTracking();
  636.  
  637. // Inicializar tracking system
  638. const playerTracker = setupModelTracking();
  639. window.playerTracker = playerTracker; // Para debug
  640. }
  641.  
  642. if (document.readyState === 'loading') {
  643. document.addEventListener('DOMContentLoaded', initialize);
  644. } else {
  645. initialize();
  646. }
  647. })();
  648.  
  649. // ...rest of existing code...
  650.