// ==UserScript== // @name VELTRIXJS - Narrow One Mod Menu // @namespace https://github.com/VeltrixJS/Cheat-Narrow-One // @version 7.3 // @description Mod menu tout-en-un pour Narrow One // @author VeltrixJS // @match https://narrow.one/* // @grant none // @run-at document-start // @license MIT // @homepageURL https://github.com/VeltrixJS/Cheat-Narrow-One // @supportURL https://github.com/VeltrixJS/Cheat-Narrow-One/issues // @downloadURL https://raw.githubusercontent.com/VeltrixJS/Cheat-Narrow-One/main/VELTRIXJS.user.js // @updateURL https://raw.githubusercontent.com/VeltrixJS/Cheat-Narrow-One/main/VELTRIXJS.user.js // ==/UserScript== (function() { 'use strict'; // ═══════════ AD SKIPPER ═══════════ const NarrowSDK = {}; Function.prototype.bind = new Proxy(Function.prototype.bind, { apply(target, thisArg, args) { if (args[0] != null && args[0].input !== undefined) { NarrowSDK.Main = args[0]; setTimeout(() => hooksActivateAds(), 0); } return Reflect.apply(target, thisArg, args); } }); Function.prototype.bind.toString = function() { return "function bind() { [native code] }"; }; Function.prototype.bind.toString.toString = function() { return "function toString() { [native code] }"; }; function hooksActivateAds() { if (!NarrowSDK.Main?.poki) return; NarrowSDK.Main.poki.originalCommercialBreak ??= NarrowSDK.Main.poki.commercialBreak; NarrowSDK.Main.poki.originalRewardedBreak ??= NarrowSDK.Main.poki.rewardedBreak; NarrowSDK.Main.poki.commercialBreak = async function() {}; NarrowSDK.Main.poki.rewardedBreak = async function() { return { success: true }; }; } // ═══════════ CONFIG ═══════════ const defaultConfig = { // Combat speedV1Enabled: true, speedV1Value: 1.6, speedV2Enabled: false, speedV2Value: 60, jumpV1Enabled: false, jumpV1Value: 35, jumpV2Enabled: true, jumpV2Value: 19, flyEnabled: false, noClipV1Enabled: false, noClipV2Enabled: true, bunnyHopEnabled: false, zoomEnabled: false, zoomPower: 2.5, // FOV caméra camFovEnabled: true, camFovValue: 117, // ESP espGabiEnabled: true, espApolloEnabled: false, espAllyColor: '#c7feff', espEnemyColor: '#00e1e1', espTeamFilter: 'all', espMaxDistance: 500, distanceEnabled: true, nameEnabled: true, healthEnabled: true, tracersEnabled: true, tracersOrigin: 'top', radarEnabled: true, radarSize: 210, radarPos: { x: 1311, y: 19 }, // Visual skyEnabled: true, skyMode: 'custom', skyColor: '#00c8c8', xrayEnabled: false, xrayAlpha: 0.5, xrayWireframe: false, // Viseur chEnabled: true, chModel: 'cross', chColor: '#ffffff', chSize: 24, chThick: 2, chGap: 5, chDynamic: true, chDynamicColor: '#00e1e1', chRainbow: true, chRainbowSpeed: 30, // Anti-AFK afkEnabled: true, // Aimbot aimbotEnabled: true, aimbotBind: 'rightclick', aimbotTargetZone: 'chest', aimbotCustomOffset: 0.6, aimbotSmooth: 0, aimbotTargeting: 'crosshair', aimbotHumanization: 0, aimbotReactionDelay: 0, fovEnabled: true, fovRadius: 340, fovCircleVisible: true, // Binds bindMenu: 'insert', bindAimbotToggle: 'f', bindEspToggle: 'e', bindNoClipV2: 'x', bindChat: 't', // Overlays debugEnabled: false, watermarkEnabled: true, bindsOverlayEnabled: true, // UI uiAccent: '#00dce1', menuPos: { x: 246, y: 5 } }; let cfg = JSON.parse(localStorage.getItem('veltrix_cfg_v7_3')) || defaultConfig; cfg = Object.assign({}, defaultConfig, cfg); const save = () => localStorage.setItem('veltrix_cfg_v7_3', JSON.stringify(cfg)); const applyAccent = () => { document.documentElement.style.setProperty('--vel-accent', cfg.uiAccent); }; applyAccent(); // ═══════════ ÉTAT ═══════════ const state = { game: null, scene: null, myPlayer: null, rigidBody: null, playerList: [], enemyList: [], closestEnemy: { index: -1, distance: Infinity }, aimbotHeld: false, aimbotHeldSince: 0, ready: false, originalFov: null }; window.__veltrixState = state; const debugStats = { fps: 0, frameCount: 0, lastFpsUpdate: 0, enemiesInFov: 0, targetName: '-', rigOk: false }; let isX = false, noclipToggle = false, isSpace = false; let bindingTarget = null; let menu = null; let debugEl = null, watermarkEl = null, bindsOverlayEl = null; let refreshAimbotButton = null; let refreshAllBindButtons = null; let syncUI = null; let hookedCamera = null; // ═══════════ HOOKS ═══════════ const originalPerformanceNow = window.performance.now.bind(window.performance); const perfStart = originalPerformanceNow(); function installSpeedHook() { const newNow = function() { const realTime = originalPerformanceNow(); let phasedTime = realTime; if (isX && cfg.noClipV1Enabled) { noclipToggle = !noclipToggle; phasedTime = noclipToggle ? realTime + 100 : realTime - 50; } if (cfg.speedV1Enabled) { return perfStart + (phasedTime - perfStart) * cfg.speedV1Value; } return phasedTime; }; try { Object.defineProperty(window.performance, 'now', { configurable: true, writable: false, value: newNow }); } catch(e) { window.performance.now = newNow; } } installSpeedHook(); const orgSign = Math.sign; Math.sign = function(n) { if (isX && cfg.noClipV1Enabled && n !== 0) { return (Math.random() > 0.5) ? -orgSign(n) : orgSign(n); } return orgSign(n); }; Object.defineProperty(Object.prototype, 'name', { get() { return this._gt_name; }, set(v) { this._gt_name = v; if (cfg.espApolloEnabled && v === 'player') { if (this.material) { const mats = Array.isArray(this.material) ? this.material : [this.material]; mats.forEach(m => { if (m) { m.depthTest = false; m.wireframe = true; } }); } } }, configurable: true }); Object.defineProperty(Object.prototype, 'jumpForce', { get() { return (cfg.jumpV1Enabled && isSpace) ? cfg.jumpV1Value : (this._jf ?? 65); }, set(v) { this._jf = v; }, configurable: true }); // ═══════════ SKY HOOK ═══════════ const TARGET_UNIFORMS = ['skyHighCol','skyMidCol','skyLowCol']; const uniformMap = new WeakMap(); const hslToRgb = (h,s,l) => { const q=l<0.5?l*(1+s):l+s-l*s, p=2*l-q; const f=t=>{if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p;}; return [f(h+1/3)*255,f(h)*255,f(h-1/3)*255]; }; const hexToRgb = hex => [parseInt(hex.slice(1,3),16),parseInt(hex.slice(3,5),16),parseInt(hex.slice(5,7),16)]; const orgGetContext = HTMLCanvasElement.prototype.getContext; HTMLCanvasElement.prototype.getContext = function() { const ctx = orgGetContext.apply(this, arguments); if ((arguments[0]==='webgl'||arguments[0]==='webgl2') && ctx && !ctx._hooked) { const orgGetLoc = ctx.getUniformLocation; ctx.getUniformLocation = function(prog,name) { const loc = orgGetLoc.apply(this,arguments); if (loc && TARGET_UNIFORMS.includes(name)) uniformMap.set(loc,name); return loc; }; const skyColor = () => cfg.skyMode==='rainbow' ? hslToRgb((originalPerformanceNow()/(100/3))%360/360,1,0.5) : hexToRgb(cfg.skyColor); const orgU3fv = ctx.uniform3fv; ctx.uniform3fv = function(loc,val) { if (uniformMap.has(loc)&&cfg.skyEnabled){const c=skyColor();return orgU3fv.call(this,loc,new Float32Array([c[0]/255,c[1]/255,c[2]/255]));} return orgU3fv.apply(this,arguments); }; const orgU3f = ctx.uniform3f; ctx.uniform3f = function(loc,v1,v2,v3) { if (uniformMap.has(loc)&&cfg.skyEnabled){const c=skyColor();return orgU3f.call(this,loc,c[0]/255,c[1]/255,c[2]/255);} return orgU3f.apply(this,arguments); }; ctx._hooked = true; } return ctx; }; // ═══════════ X-RAY HOOK ═══════════ const glProto = WebGLRenderingContext.prototype; const gl2Proto = typeof WebGL2RenderingContext!=='undefined' ? WebGL2RenderingContext.prototype : null; const xrayHook = org => function(mode,count,type,offset,ic) { if (!cfg.xrayEnabled) return org.call(this,mode,count,type,offset,ic); this.enable(this.BLEND);this.blendFunc(this.SRC_ALPHA,this.ONE_MINUS_SRC_ALPHA); this.disable(this.DEPTH_TEST);this.depthMask(false); org.call(this,cfg.xrayWireframe?this.LINES:mode,count,type,offset,ic); if (cfg.xrayAlpha>0.05){this.enable(this.DEPTH_TEST);this.depthMask(cfg.xrayAlpha>0.8);org.call(this,mode,count,type,offset,ic);} }; const orgDA = glProto.drawArrays; glProto.drawArrays = function(mode,first,count) { if (!cfg.xrayEnabled) return orgDA.call(this,mode,first,count); this.disable(this.DEPTH_TEST);orgDA.call(this,cfg.xrayWireframe?this.LINES:mode,first,count); this.enable(this.DEPTH_TEST);if(cfg.xrayAlpha>0.1)orgDA.call(this,mode,first,count); }; glProto.drawElements = xrayHook(glProto.drawElements); if (gl2Proto) { gl2Proto.drawElements = xrayHook(gl2Proto.drawElements); gl2Proto.drawElementsInstanced = xrayHook(gl2Proto.drawElementsInstanced); const orgDAI = gl2Proto.drawArraysInstanced; gl2Proto.drawArraysInstanced = function(mode,first,count,ic) { if (!cfg.xrayEnabled) return orgDAI.call(this,mode,first,count,ic); this.disable(this.DEPTH_TEST);orgDAI.call(this,cfg.xrayWireframe?this.LINES:mode,first,count,ic); this.enable(this.DEPTH_TEST);if(cfg.xrayAlpha>0.1)orgDAI.call(this,mode,first,count,ic); }; } // ═══════════ BACKEND JEU ═══════════ const originalPush = Array.prototype.push; Array.prototype.push = function (...args) { try { const game = args[0]?.playerCollider?.rigidBody?.player?.game; if (game) { state.game = game; state.scene = game.scene?.parent; } } catch(e) {} return originalPush.apply(this, args); }; if (!window.THREE) { const s = document.createElement('script'); s.src = 'https://unpkg.com/three@0.150.0/build/three.min.js'; document.head.appendChild(s); } function getCamera() { if (!state.game) return null; if (state.game.camera) return state.game.camera; if (state.game.scene?.camera) return state.game.scene.camera; if (state.scene?.camera) return state.scene.camera; if (state.myPlayer?.camera) return state.myPlayer.camera; if (state.scene) { let found = null; state.scene.traverse(obj => { if (!found && obj.isCamera) found = obj; }); if (found) return found; } for (const key in state.game) { const val = state.game[key]; if (val && val.isCamera) return val; } return null; } // ═══════════ FILTRES ESP ═══════════ function playerPassesFilter(player) { if (!state.myPlayer) return false; const isEnemy = player.teamId !== state.myPlayer.teamId; if (cfg.espTeamFilter === 'enemy' && !isEnemy) return false; if (cfg.espTeamFilter === 'ally' && isEnemy) return false; const myPos = state.myPlayer.obj?.position; const pPos = player.obj?.position; if (myPos && pPos) { const d = myPos.distanceTo(pPos); if (d > cfg.espMaxDistance) return false; } return true; } // ═══════════ BUNNY HOP ═══════════ let lastHopTime = 0; function doBunnyHop() { if (!cfg.bunnyHopEnabled || !state.ready) return; const now = Date.now(); if (now - lastHopTime < 100) return; lastHopTime = now; document.dispatchEvent(new KeyboardEvent('keydown', { key:' ', code:'Space', keyCode:32, which:32, bubbles:true })); setTimeout(() => { document.dispatchEvent(new KeyboardEvent('keyup', { key:' ', code:'Space', keyCode:32, which:32, bubbles:true })); }, 40); } // ═══════════ FOV CAMÉRA ═══════════ function hookCameraFov(cam) { if (!cam || cam._veltrixFovHooked) return; cam._veltrixFovHooked = true; cam._veltrixOrigUpdateProjection = cam.updateProjectionMatrix.bind(cam); cam.updateProjectionMatrix = function() { if (cfg.camFovEnabled) { this.fov = cfg.camFovValue; } return this._veltrixOrigUpdateProjection(); }; } function doCameraFov() { const cam = getCamera(); if (!cam) return; if (state.originalFov === null && cam.fov) state.originalFov = cam.fov; if (hookedCamera !== cam) { hookedCamera = cam; hookCameraFov(cam); } if (cfg.camFovEnabled) { if (cam.fov !== cfg.camFovValue) { cam.fov = cfg.camFovValue; cam.updateProjectionMatrix(); } } else if (state.originalFov !== null && cam.fov !== state.originalFov) { cam.fov = state.originalFov; cam.updateProjectionMatrix(); } } // ═══════════ BOUCLE ═══════════ function updateGame() { if (!state.game?.gameStarted) return; try { state.myPlayer = state.game.getMyPlayer(); if (!state.myPlayer) { state.ready = false; state.playerList = []; state.enemyList = []; state.rigidBody = null; return; } state.rigidBody = [...state.myPlayer.physicsManager.rigidBodies].filter( e => e.player?.id === state.myPlayer.id )[0]; debugStats.rigOk = !!state.rigidBody; state.ready = true; state.playerList = [...state.game.players.values()].filter(e => e && e.id !== state.myPlayer.id); state.enemyList = state.playerList.filter(e => e.teamId !== state.myPlayer.teamId); if (state.rigidBody) { state.rigidBody.fly = cfg.flyEnabled; state.rigidBody.noclip = cfg.noClipV2Enabled ? isX : false; } if (state.myPlayer) { if (cfg.speedV2Enabled) state.myPlayer.walkSpeed = cfg.speedV2Value; if (cfg.jumpV2Enabled) state.myPlayer.jumpForce = cfg.jumpV2Value; } if (state.game?.chat) { const chat = state.game.chat; if (!chat.toggledVisible) chat.toggledVisible = true; if (!chat.visible && typeof chat.updateVisibility === 'function') chat.updateVisibility(); } findClosestEnemy(); doAimbot(); doEspGabi(); updateEspInfos(); updateTracers(); updateRadar(); updateDynamicCrosshair(); doBunnyHop(); doCameraFov(); } catch(e) {} } function rafLoop(t) { debugStats.frameCount++; if (t - debugStats.lastFpsUpdate >= 500) { debugStats.fps = Math.round(debugStats.frameCount * 1000 / (t - debugStats.lastFpsUpdate)); debugStats.frameCount = 0; debugStats.lastFpsUpdate = t; } updateGame(); if (debugEl) updateDebugOverlay(); if (watermarkEl) updateWatermark(); if (cfg.chRainbow && cfg.chEnabled && window.__veltrixUpdateCH) { window.__veltrixUpdateCH(); } requestAnimationFrame(rafLoop); } requestAnimationFrame(rafLoop); setInterval(() => { if (cfg.speedV1Enabled || cfg.noClipV1Enabled) installSpeedHook(); }, 200); function findClosestEnemy() { state.closestEnemy.index = -1; state.closestEnemy.distance = Infinity; const myPos = state.myPlayer?.obj?.position; if (!myPos) return; state.enemyList.forEach((e, i) => { const pos = e?.obj?.position; if (!pos) return; const d = myPos.distanceTo(pos); if (d < state.closestEnemy.distance) { state.closestEnemy.index = i; state.closestEnemy.distance = d; } }); } // ═══════════ AIMBOT ═══════════ function getEnemyHP(player) { let raw = null; if (player.health !== undefined) raw = player.health; else if (player.hp !== undefined) raw = player.hp; else if (player.playerHealth !== undefined) raw = player.playerHealth; else if (player.currentHealth !== undefined) raw = player.currentHealth; else if (player.life !== undefined) raw = player.life; if (raw === null) return 100; return (raw <= 1.5 && raw >= -1.5) ? raw * 100 : raw; } function findTargetByMode() { const cam = getCamera(); if (!state.myPlayer) return null; let candidates = state.enemyList.slice(); if (cfg.fovEnabled) { if (!cam) return null; const w = window.innerWidth / 2, h = window.innerHeight / 2; candidates = candidates.filter(enemy => { const pos = enemy?.obj?.position; if (!pos) return false; const p = pos.clone(); p.y += 0.6; const proj = p.project(cam); if (proj.z > 1) return false; const sx = (proj.x * 0.5 + 0.5) * window.innerWidth; const sy = (-proj.y * 0.5 + 0.5) * window.innerHeight; const d = Math.sqrt((sx - w) ** 2 + (sy - h) ** 2); return d < cfg.fovRadius; }); } if (!candidates.length) return null; if (cfg.aimbotTargeting === 'lowest_hp') { let best = null, bestHp = Infinity; candidates.forEach(e => { const hp = getEnemyHP(e); if (hp < bestHp) { bestHp = hp; best = e; } }); return best; } if (cfg.aimbotTargeting === 'crosshair' && cam) { let best = null, bestDist = Infinity; const w = window.innerWidth / 2, h = window.innerHeight / 2; candidates.forEach(enemy => { const pos = enemy?.obj?.position; if (!pos) return; const p = pos.clone(); p.y += 0.6; const proj = p.project(cam); if (proj.z > 1) return; const sx = (proj.x * 0.5 + 0.5) * window.innerWidth; const sy = (-proj.y * 0.5 + 0.5) * window.innerHeight; const d = Math.sqrt((sx - w) ** 2 + (sy - h) ** 2); if (d < bestDist) { bestDist = d; best = enemy; } }); return best; } let best = null, bestDist = Infinity; const myPos = state.myPlayer.obj?.position; if (!myPos) return candidates[0]; candidates.forEach(e => { const pos = e?.obj?.position; if (!pos) return; const d = myPos.distanceTo(pos); if (d < bestDist) { bestDist = d; best = e; } }); return best; } function doAimbot() { if (!cfg.aimbotEnabled || !state.aimbotHeld || !state.ready) return; if (!state.myPlayer?.lookRot) return; if (cfg.aimbotReactionDelay > 0) { const elapsed = Date.now() - state.aimbotHeldSince; if (elapsed < cfg.aimbotReactionDelay) return; } const enemy = findTargetByMode(); if (!enemy?.pos) return; if (cfg.debugEnabled) { const nm = enemy.username || enemy.nickname || enemy.name || '?'; debugStats.targetName = String(nm); } let offsetY = 0; switch (cfg.aimbotTargetZone) { case 'head': offsetY = 0.6; break; case 'chest': offsetY = 0.3; break; case 'body': offsetY = 0.0; break; case 'legs': offsetY = -0.3; break; case 'feet': offsetY = -0.6; break; case 'custom': offsetY = cfg.aimbotCustomOffset; break; } const dx = enemy.pos.x - state.myPlayer.pos.x; const dy = (enemy.pos.y + offsetY) - state.myPlayer.pos.y; const dz = enemy.pos.z - state.myPlayer.pos.z; let targetX = Math.atan2(-dx, -dz); let targetY = Math.atan2(dy, Math.sqrt(dx*dx + dz*dz)); if (cfg.aimbotHumanization > 0) { const h = cfg.aimbotHumanization / 100; targetX += (Math.random() - 0.5) * 0.03 * h; targetY += (Math.random() - 0.5) * 0.03 * h; } const smoothFactor = 1 - cfg.aimbotSmooth; let deltaX = targetX - state.myPlayer.lookRot.x; while (deltaX > Math.PI) deltaX -= 2 * Math.PI; while (deltaX < -Math.PI) deltaX += 2 * Math.PI; state.myPlayer.lookRot.x += deltaX * smoothFactor; state.myPlayer.lookRot.y += (targetY - state.myPlayer.lookRot.y) * smoothFactor; } // ═══════════ FOV CIRCLE ═══════════ let fovCircleEl = null; function updateFovCircle() { if (!document.body) return; if (!fovCircleEl) { fovCircleEl = document.createElement('div'); fovCircleEl.id = 'veltrix-fov'; fovCircleEl.style.cssText = ` position:fixed;top:50%;left:50%; transform:translate(-50%,-50%); border:2px solid rgba(255,255,255,0.5); border-radius:50%;pointer-events:none;z-index:9998; display:none; `; document.body.appendChild(fovCircleEl); } if (cfg.fovEnabled && cfg.fovCircleVisible) { fovCircleEl.style.display = 'block'; fovCircleEl.style.width = (cfg.fovRadius * 2) + 'px'; fovCircleEl.style.height = (cfg.fovRadius * 2) + 'px'; } else { fovCircleEl.style.display = 'none'; } } // ═══════════ ESP BOX3 ═══════════ function doEspGabi() { if (!window.THREE || !state.myPlayer) return; state.playerList.forEach(player => { const obj = player?.obj; if (!obj) return; const pass = playerPassesFilter(player); if (!cfg.espGabiEnabled || !pass) { if (obj.espBox) obj.espBox.visible = false; return; } if (obj.espBox) { obj.espBox.visible = true; const colorHex = player.teamId === state.myPlayer.teamId ? cfg.espAllyColor : cfg.espEnemyColor; if (obj.espBox.material.color.getHexString() !== colorHex.replace('#','')) { obj.espBox.material.color.set(colorHex); } return; } try { const bbox = new THREE.Box3().setFromObject(obj); const size = new THREE.Vector3(), center = new THREE.Vector3(); bbox.getSize(size); bbox.getCenter(center); const geometry = new THREE.EdgesGeometry(new THREE.BoxGeometry(size.x, size.y, size.z)); const colorHex = player.teamId === state.myPlayer.teamId ? cfg.espAllyColor : cfg.espEnemyColor; const material = new THREE.LineBasicMaterial({ color: new THREE.Color(colorHex), depthTest: false }); const box = new THREE.LineSegments(geometry, material); box.position.copy(obj.worldToLocal(center.clone())); box.position.y += 1; box.frustumCulled = false; box.renderOrder = 9999; obj.add(box); obj.espBox = box; } catch(e) {} }); } // ═══════════ SPRITES ESP ═══════════ function makeTextSprite(text, color) { const canvas = document.createElement('canvas'); canvas.width = 256; canvas.height = 64; const ctx = canvas.getContext('2d'); ctx.font = 'bold 40px Segoe UI, sans-serif'; ctx.fillStyle = color; ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.strokeStyle = 'rgba(0,0,0,0.8)'; ctx.lineWidth = 6; ctx.strokeText(text, 128, 32); ctx.fillText(text, 128, 32); const texture = new THREE.CanvasTexture(canvas); texture.minFilter = THREE.LinearFilter; const material = new THREE.SpriteMaterial({ map: texture, depthTest: false, transparent: true }); const sprite = new THREE.Sprite(material); sprite.scale.set(2, 0.5, 1); return sprite; } function updateTextSprite(sprite, text, color) { const canvas = sprite.material.map.image; const ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.font = 'bold 40px Segoe UI, sans-serif'; ctx.fillStyle = color; ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.strokeStyle = 'rgba(0,0,0,0.8)'; ctx.lineWidth = 6; ctx.strokeText(text, 128, 32); ctx.fillText(text, 128, 32); sprite.material.map.needsUpdate = true; } function updateEspInfos() { if (!window.THREE || !state.myPlayer) return; state.playerList.forEach(player => { const obj = player?.obj; if (!obj) return; const isEnemy = player.teamId !== state.myPlayer.teamId; const color = isEnemy ? cfg.espEnemyColor : cfg.espAllyColor; const pass = playerPassesFilter(player); if (cfg.distanceEnabled && pass) { if (!obj._espDist) { obj._espDist = makeTextSprite('0m', color); obj._espDist.position.y = 3.5; obj.add(obj._espDist); } const d = state.myPlayer.obj.position.distanceTo(obj.position); updateTextSprite(obj._espDist, `${Math.round(d)}m`, color); obj._espDist.visible = true; } else if (obj._espDist) obj._espDist.visible = false; if (cfg.nameEnabled && pass) { if (!obj._espName) { obj._espName = makeTextSprite('?', color); obj._espName.position.y = 3.0; obj._espName.scale.set(3, 0.7, 1); obj.add(obj._espName); } let pseudo = player.username || player.nickname || player.displayName || player.userName || player.pseudo || player.playerName || player.tag || player.user?.name || player.user?.username || player.data?.name || player.info?.name; if (!pseudo && typeof player.name === 'string' && player.name !== 'player') pseudo = player.name; updateTextSprite(obj._espName, String(pseudo || '???'), color); obj._espName.visible = true; } else if (obj._espName) obj._espName.visible = false; if (cfg.healthEnabled && pass) { if (!obj._espHP) { obj._espHP = makeTextSprite('100', color); obj._espHP.position.y = 2.5; obj.add(obj._espHP); } let hp = Math.round(getEnemyHP(player)); let hpColor = color; if (hp <= 0) hpColor = '#666666'; else if (hp < 30) hpColor = '#ff4444'; else if (hp < 60) hpColor = '#ffaa00'; updateTextSprite(obj._espHP, `❤ ${hp}`, hpColor); obj._espHP.visible = true; } else if (obj._espHP) obj._espHP.visible = false; }); } // ═══════════ TRACERS ═══════════ const tracers = new Map(); function getTracerOrigin() { const cam = getCamera(); if (!cam) { if (state.myPlayer?.obj?.position) return state.myPlayer.obj.position.clone(); return new THREE.Vector3(); } let ndcY = 0; if (cfg.tracersOrigin === 'top') ndcY = 0.95; else if (cfg.tracersOrigin === 'bottom') ndcY = -0.95; const DIST = 0.5; const fovRad = (cam.fov || 75) * Math.PI / 180; const halfHeight = Math.tan(fovRad / 2) * DIST; const localY = ndcY * halfHeight; const localPoint = new THREE.Vector3(0, localY, -DIST); const worldPoint = localPoint.clone(); cam.localToWorld(worldPoint); return worldPoint; } function updateTracers() { if (!window.THREE || !state.scene) return; const currentIds = new Set(); if (state.myPlayer) { state.playerList.forEach(player => { const obj = player?.obj; if (!obj) return; currentIds.add(player.id); const pass = playerPassesFilter(player); if (!cfg.tracersEnabled || !pass) { const t = tracers.get(player.id); if (t) t.visible = false; return; } const isEnemy = player.teamId !== state.myPlayer.teamId; const color = isEnemy ? cfg.espEnemyColor : cfg.espAllyColor; let tracer = tracers.get(player.id); if (!tracer) { const geometry = new THREE.BufferGeometry().setFromPoints([ new THREE.Vector3(), new THREE.Vector3() ]); const material = new THREE.LineBasicMaterial({ color: new THREE.Color(color), depthTest: false, transparent: true, opacity: 0.85 }); tracer = new THREE.Line(geometry, material); tracer.frustumCulled = false; tracer.renderOrder = 9998; state.scene.add(tracer); tracers.set(player.id, tracer); } tracer.material.color.set(color); const start = getTracerOrigin(); const end = obj.position.clone(); end.y += 0.6; tracer.geometry.setFromPoints([start, end]); tracer.geometry.attributes.position.needsUpdate = true; tracer.geometry.computeBoundingSphere(); tracer.visible = true; }); } tracers.forEach((tracer, id) => { if (!currentIds.has(id) || !cfg.tracersEnabled || !state.myPlayer) { if (tracer.parent) tracer.parent.remove(tracer); tracer.geometry.dispose(); tracer.material.dispose(); tracers.delete(id); } }); } // ═══════════ RADAR ═══════════ let radarCanvas = null, radarCtx = null; let radarDragging = false, radarDragOffset = { x: 0, y: 0 }; function initRadar() { if (radarCanvas || !document.body) return; radarCanvas = document.createElement('canvas'); radarCanvas.id = 'veltrix-radar'; radarCanvas.style.cssText = ` position:fixed; border-radius:12px;background:rgba(0,0,0,0.6); border:1px solid rgba(255,255,255,0.15); backdrop-filter:blur(6px); z-index:9997;display:none; cursor:grab;user-select:none;touch-action:none; `; radarCtx = radarCanvas.getContext('2d'); document.body.appendChild(radarCanvas); applyRadarPosition(); radarCanvas.addEventListener('mousedown', e => { if (e.button !== 0) return; e.preventDefault(); e.stopPropagation(); radarDragging = true; const rect = radarCanvas.getBoundingClientRect(); radarDragOffset.x = e.clientX - rect.left; radarDragOffset.y = e.clientY - rect.top; radarCanvas.style.cursor = 'grabbing'; }); document.addEventListener('mousemove', e => { if (!radarDragging) return; const x = e.clientX - radarDragOffset.x; const y = e.clientY - radarDragOffset.y; const maxX = window.innerWidth - cfg.radarSize; const maxY = window.innerHeight - cfg.radarSize; const cx = Math.max(0, Math.min(maxX, x)); const cy = Math.max(0, Math.min(maxY, y)); cfg.radarPos = { x: cx, y: cy }; radarCanvas.style.left = cx + 'px'; radarCanvas.style.top = cy + 'px'; save(); }); document.addEventListener('mouseup', () => { if (radarDragging) { radarDragging = false; radarCanvas.style.cursor = 'grab'; } }); } function applyRadarPosition() { if (!radarCanvas) return; if (cfg.radarPos && cfg.radarPos.x != null && cfg.radarPos.y != null) { radarCanvas.style.left = cfg.radarPos.x + 'px'; radarCanvas.style.top = cfg.radarPos.y + 'px'; } else { radarCanvas.style.left = (window.innerWidth - cfg.radarSize - 20) + 'px'; radarCanvas.style.top = '20px'; } } function updateRadar() { if (!radarCanvas || !radarCtx) return; const size = cfg.radarSize; if (radarCanvas.width !== size) { radarCanvas.width = size; radarCanvas.height = size; radarCanvas.style.width = size + 'px'; radarCanvas.style.height = size + 'px'; } radarCanvas.style.display = cfg.radarEnabled ? 'block' : 'none'; if (!cfg.radarEnabled) return; radarCtx.clearRect(0, 0, size, size); const myPos = state.myPlayer?.obj?.position; if (!myPos) return; const RANGE = 60; const scale = (size / 2) / RANGE; const cx = size / 2, cy = size / 2; radarCtx.strokeStyle = 'rgba(255,255,255,0.1)'; radarCtx.lineWidth = 1; radarCtx.beginPath(); radarCtx.arc(cx, cy, size/2 - 4, 0, Math.PI * 2); radarCtx.stroke(); state.playerList.forEach(p => { const pos = p?.obj?.position; if (!pos) return; const dx = pos.x - myPos.x; const dz = pos.z - myPos.z; if (Math.sqrt(dx*dx + dz*dz) > RANGE) return; const isEnemy = p.teamId !== state.myPlayer.teamId; const color = isEnemy ? cfg.espEnemyColor : cfg.espAllyColor; const rot = state.myPlayer.lookRot?.x || 0; const cosR = Math.cos(-rot), sinR = Math.sin(-rot); const rotX = dx * cosR - dz * sinR; const rotZ = dx * sinR + dz * cosR; radarCtx.fillStyle = color; radarCtx.beginPath(); radarCtx.arc(cx + rotX * scale, cy + rotZ * scale, 4, 0, Math.PI * 2); radarCtx.fill(); }); radarCtx.fillStyle = '#ffffff'; radarCtx.beginPath(); radarCtx.arc(cx, cy, 5, 0, Math.PI * 2); radarCtx.fill(); radarCtx.strokeStyle = '#ffffff'; radarCtx.lineWidth = 2; radarCtx.beginPath(); radarCtx.moveTo(cx, cy); radarCtx.lineTo(cx, cy - 12); radarCtx.stroke(); } // ═══════════ ANTI-AFK ═══════════ let afkTimer, isAFK = false; const AFK_DELAY = 10000; function afkJumpLoop() { if (!isAFK || !cfg.afkEnabled) return; document.dispatchEvent(new KeyboardEvent('keydown', { key:' ', code:'Space', keyCode:32, which:32, bubbles:true })); setTimeout(() => document.dispatchEvent(new KeyboardEvent('keyup', { key:' ', code:'Space', keyCode:32, which:32, bubbles:true })), 150); setTimeout(afkJumpLoop, 5000 + Math.random() * 7000); } function resetAfkTimer() { isAFK = false; clearTimeout(afkTimer); if (!cfg.afkEnabled) return; afkTimer = setTimeout(() => { isAFK = true; afkJumpLoop(); }, AFK_DELAY); } ['mousemove','keydown','mousedown','touchstart'].forEach(evt => window.addEventListener(evt, resetAfkTimer, { passive:true }) ); // ═══════════ CROSSHAIR DYNAMIQUE ═══════════ let chDynamicActive = false; function updateDynamicCrosshair() { if (!cfg.chEnabled) return; let active = false; if (cfg.chDynamic && state.myPlayer) { const radius = cfg.fovRadius; const cam = getCamera(); if (cam) { const w = window.innerWidth / 2, h = window.innerHeight / 2; for (const enemy of state.enemyList) { const pos = enemy?.obj?.position; if (!pos) continue; const p = pos.clone(); p.y += 0.6; const proj = p.project(cam); if (proj.z > 1) continue; const sx = (proj.x * 0.5 + 0.5) * window.innerWidth; const sy = (-proj.y * 0.5 + 0.5) * window.innerHeight; const d = Math.sqrt((sx - w) ** 2 + (sy - h) ** 2); if (d < radius) { active = true; break; } } } } if (active !== chDynamicActive) { chDynamicActive = active; if (window.__veltrixUpdateCH) window.__veltrixUpdateCH(); } } // ═══════════ DEBUG OVERLAY ═══════════ function initDebugOverlay() { if (debugEl || !document.body) return; debugEl = document.createElement('div'); debugEl.id = 'veltrix-debug'; debugEl.style.cssText = ` position:fixed;top:55px;left:10px; background:rgba(0,0,0,0.75); border:1px solid rgba(255,255,255,0.15); border-radius:8px;padding:8px 12px; font-family:'Consolas','Monaco',monospace; font-size:11px;color:#0f0;line-height:1.5; z-index:9999;pointer-events:none;display:none; white-space:pre;min-width:180px; `; document.body.appendChild(debugEl); } function updateDebugOverlay() { if (!debugEl) return; debugEl.style.display = cfg.debugEnabled ? 'block' : 'none'; if (!cfg.debugEnabled) return; const lines = [ `FPS ${debugStats.fps}`, `Ready ${state.ready ? 'yes' : 'no'}`, `Rigid ${debugStats.rigOk ? 'yes' : 'no'}`, `Players ${state.playerList.length}`, `Enemies ${state.enemyList.length}`, `Target ${debugStats.targetName}`, `Aimbot ${state.aimbotHeld ? 'HOLD' : 'idle'}` ]; debugEl.textContent = lines.join('\n'); } // ═══════════ WATERMARK ═══════════ function initWatermark() { if (watermarkEl || !document.body) return; watermarkEl = document.createElement('div'); watermarkEl.id = 'veltrix-watermark'; watermarkEl.style.cssText = ` position:fixed;top:10px;left:10px; background:rgba(20,20,30,0.7); border:1px solid rgba(255,255,255,0.15); border-radius:8px;padding:5px 12px; font-family:'Segoe UI',sans-serif; font-size:11px;font-weight:700;letter-spacing:1px; color:var(--vel-accent);z-index:9999; pointer-events:none;display:none; text-transform:uppercase; `; document.body.appendChild(watermarkEl); } function updateWatermark() { if (!watermarkEl) return; watermarkEl.style.display = cfg.watermarkEnabled ? 'block' : 'none'; if (!cfg.watermarkEnabled) return; watermarkEl.textContent = `VELTRIXJS v7.3 | ${debugStats.fps} FPS`; } // ═══════════ BINDS OVERLAY ═══════════ function initBindsOverlay() { if (bindsOverlayEl || !document.body) return; bindsOverlayEl = document.createElement('div'); bindsOverlayEl.id = 'veltrix-binds'; bindsOverlayEl.style.cssText = ` position:fixed;top:10px;right:10px; background:rgba(20,20,30,0.7); border:1px solid rgba(255,255,255,0.15); border-radius:8px;padding:8px 14px; font-family:'Consolas','Monaco',monospace; font-size:11px;color:rgba(255,255,255,0.85); z-index:9999;pointer-events:none;display:none; line-height:1.6;min-width:150px; `; document.body.appendChild(bindsOverlayEl); } function updateBindsOverlay() { if (!bindsOverlayEl) return; bindsOverlayEl.style.display = cfg.bindsOverlayEnabled ? 'block' : 'none'; if (!cfg.bindsOverlayEnabled) return; const k = cfg.bindMenu.toUpperCase().padEnd(6); const f = cfg.bindAimbotToggle.toUpperCase().padEnd(6); const e = cfg.bindEspToggle.toUpperCase().padEnd(6); const x = cfg.bindNoClipV2.toUpperCase().padEnd(6); const t = cfg.bindChat.toUpperCase().padEnd(6); bindsOverlayEl.innerHTML = `