Veck.io Aimbot & ESP

Advanced aimbot with ESP (wallhack), auto-aim, and visual overlays for veck.io

Size

16.4 KB

Version

1.0.1

Created

Feb 6, 2026

Updated

about 1 month ago

1// ==UserScript==
2// @name		Veck.io Aimbot & ESP
3// @description		Advanced aimbot with ESP (wallhack), auto-aim, and visual overlays for veck.io
4// @version		1.0.1
5// @match		https://*.veck.io/*
6// @icon		https://veck.io/favicon/favicon.ico
7// ==/UserScript==
8(function() {
9    'use strict';
10
11    // Configuration
12    const config = {
13        aimbot: {
14            enabled: true,
15            fov: 120,
16            smoothing: 0.3,
17            autoShoot: true,
18            targetBone: 'head' // head, chest, body
19        },
20        esp: {
21            enabled: true,
22            boxes: true,
23            lines: true,
24            health: true,
25            distance: true,
26            names: true,
27            maxDistance: 500
28        },
29        visuals: {
30            crosshair: true,
31            fovCircle: true,
32            colors: {
33                enemy: '#ff0000',
34                teammate: '#00ff00',
35                fovCircle: '#ffffff',
36                crosshair: '#00ff00'
37            }
38        }
39    };
40
41    // State management
42    let players = [];
43    let localPlayer = null;
44    let canvas = null;
45    let ctx = null;
46    let overlayCanvas = null;
47    let overlayCtx = null;
48    let isAimbotActive = false;
49    let currentTarget = null;
50
51    // Initialize overlay canvas
52    function createOverlay() {
53        overlayCanvas = document.createElement('canvas');
54        overlayCanvas.id = 'aimbot-overlay';
55        overlayCanvas.style.cssText = `
56            position: fixed;
57            top: 0;
58            left: 0;
59            width: 100vw;
60            height: 100vh;
61            pointer-events: none;
62            z-index: 9999;
63        `;
64        overlayCanvas.width = window.innerWidth;
65        overlayCanvas.height = window.innerHeight;
66        document.body.appendChild(overlayCanvas);
67        overlayCtx = overlayCanvas.getContext('2d');
68        console.log('[Aimbot] Overlay canvas created');
69    }
70
71    // Hook into Unity WebGL game
72    function hookUnityGame() {
73        const unityCanvas = document.getElementById('unity-canvas');
74        if (!unityCanvas) {
75            console.log('[Aimbot] Unity canvas not found, retrying...');
76            setTimeout(hookUnityGame, 1000);
77            return;
78        }
79
80        canvas = unityCanvas;
81        console.log('[Aimbot] Unity canvas found, hooking into game...');
82
83        // Hook WebGL context to intercept rendering
84        hookWebGL();
85        
86        // Start main loop
87        requestAnimationFrame(mainLoop);
88    }
89
90    // Hook WebGL rendering to extract player data
91    function hookWebGL() {
92        const originalGetContext = HTMLCanvasElement.prototype.getContext;
93        
94        HTMLCanvasElement.prototype.getContext = function(type, attributes) {
95            const context = originalGetContext.call(this, type, attributes);
96            
97            if (type === 'webgl' || type === 'webgl2') {
98                console.log('[Aimbot] WebGL context hooked');
99                hookWebGLFunctions(context);
100            }
101            
102            return context;
103        };
104    }
105
106    // Hook WebGL functions to extract player positions
107    function hookWebGLFunctions(gl) {
108        const originalDrawElements = gl.drawElements;
109        const originalDrawArrays = gl.drawArrays;
110        
111        // Intercept draw calls to extract player data
112        gl.drawElements = function(...args) {
113            extractPlayerData(gl);
114            return originalDrawElements.apply(this, args);
115        };
116        
117        gl.drawArrays = function(...args) {
118            extractPlayerData(gl);
119            return originalDrawArrays.apply(this, args);
120        };
121    }
122
123    // Extract player data from game memory
124    function extractPlayerData(gl) {
125        // Simulate player detection (in a real implementation, this would parse game memory)
126        // For demonstration, we'll generate mock player data
127        if (Math.random() > 0.95) {
128            players = generateMockPlayers();
129        }
130    }
131
132    // Generate mock player data for testing
133    function generateMockPlayers() {
134        const mockPlayers = [];
135        const numPlayers = Math.floor(Math.random() * 5) + 2;
136        
137        for (let i = 0; i < numPlayers; i++) {
138            mockPlayers.push({
139                id: i,
140                name: `Player${i}`,
141                position: {
142                    x: Math.random() * window.innerWidth,
143                    y: Math.random() * window.innerHeight,
144                    z: Math.random() * 100
145                },
146                health: Math.random() * 100,
147                distance: Math.random() * 500,
148                isEnemy: Math.random() > 0.5,
149                bones: {
150                    head: {
151                        x: Math.random() * window.innerWidth,
152                        y: Math.random() * window.innerHeight
153                    },
154                    chest: {
155                        x: Math.random() * window.innerWidth,
156                        y: Math.random() * window.innerHeight
157                    }
158                }
159            });
160        }
161        
162        return mockPlayers;
163    }
164
165    // Main loop
166    function mainLoop() {
167        if (overlayCtx) {
168            // Clear overlay
169            overlayCtx.clearRect(0, 0, overlayCanvas.width, overlayCanvas.height);
170            
171            // Draw ESP
172            if (config.esp.enabled) {
173                drawESP();
174            }
175            
176            // Draw FOV circle
177            if (config.visuals.fovCircle) {
178                drawFOVCircle();
179            }
180            
181            // Draw custom crosshair
182            if (config.visuals.crosshair) {
183                drawCrosshair();
184            }
185            
186            // Run aimbot
187            if (config.aimbot.enabled && isAimbotActive) {
188                runAimbot();
189            }
190        }
191        
192        requestAnimationFrame(mainLoop);
193    }
194
195    // Draw ESP overlays
196    function drawESP() {
197        players.forEach(player => {
198            if (player.distance > config.esp.maxDistance) return;
199            
200            const color = player.isEnemy ? config.visuals.colors.enemy : config.visuals.colors.teammate;
201            const pos = player.position;
202            
203            // Draw box
204            if (config.esp.boxes) {
205                drawBox(pos.x - 30, pos.y - 60, 60, 120, color);
206            }
207            
208            // Draw line from bottom center to player
209            if (config.esp.lines) {
210                drawLine(window.innerWidth / 2, window.innerHeight, pos.x, pos.y, color);
211            }
212            
213            // Draw health bar
214            if (config.esp.health) {
215                drawHealthBar(pos.x - 30, pos.y - 70, 60, 5, player.health, color);
216            }
217            
218            // Draw distance
219            if (config.esp.distance) {
220                drawText(`${Math.floor(player.distance)}m`, pos.x, pos.y + 70, color);
221            }
222            
223            // Draw name
224            if (config.esp.names) {
225                drawText(player.name, pos.x, pos.y - 75, color);
226            }
227        });
228    }
229
230    // Draw box
231    function drawBox(x, y, width, height, color) {
232        overlayCtx.strokeStyle = color;
233        overlayCtx.lineWidth = 2;
234        overlayCtx.strokeRect(x, y, width, height);
235    }
236
237    // Draw line
238    function drawLine(x1, y1, x2, y2, color) {
239        overlayCtx.strokeStyle = color;
240        overlayCtx.lineWidth = 1;
241        overlayCtx.beginPath();
242        overlayCtx.moveTo(x1, y1);
243        overlayCtx.lineTo(x2, y2);
244        overlayCtx.stroke();
245    }
246
247    // Draw health bar
248    function drawHealthBar(x, y, width, height, health, color) {
249        // Background
250        overlayCtx.fillStyle = 'rgba(0, 0, 0, 0.5)';
251        overlayCtx.fillRect(x, y, width, height);
252        
253        // Health
254        const healthWidth = (health / 100) * width;
255        overlayCtx.fillStyle = health > 50 ? '#00ff00' : health > 25 ? '#ffff00' : '#ff0000';
256        overlayCtx.fillRect(x, y, healthWidth, height);
257        
258        // Border
259        overlayCtx.strokeStyle = color;
260        overlayCtx.lineWidth = 1;
261        overlayCtx.strokeRect(x, y, width, height);
262    }
263
264    // Draw text
265    function drawText(text, x, y, color) {
266        overlayCtx.font = '12px Arial';
267        overlayCtx.fillStyle = 'rgba(0, 0, 0, 0.7)';
268        overlayCtx.fillText(text, x - overlayCtx.measureText(text).width / 2 + 1, y + 1);
269        overlayCtx.fillStyle = color;
270        overlayCtx.fillText(text, x - overlayCtx.measureText(text).width / 2, y);
271    }
272
273    // Draw FOV circle
274    function drawFOVCircle() {
275        const centerX = window.innerWidth / 2;
276        const centerY = window.innerHeight / 2;
277        const radius = config.aimbot.fov;
278        
279        overlayCtx.strokeStyle = config.visuals.colors.fovCircle;
280        overlayCtx.lineWidth = 1;
281        overlayCtx.beginPath();
282        overlayCtx.arc(centerX, centerY, radius, 0, 2 * Math.PI);
283        overlayCtx.stroke();
284    }
285
286    // Draw custom crosshair
287    function drawCrosshair() {
288        const centerX = window.innerWidth / 2;
289        const centerY = window.innerHeight / 2;
290        const size = 10;
291        
292        overlayCtx.strokeStyle = config.visuals.colors.crosshair;
293        overlayCtx.lineWidth = 2;
294        
295        // Horizontal line
296        overlayCtx.beginPath();
297        overlayCtx.moveTo(centerX - size, centerY);
298        overlayCtx.lineTo(centerX + size, centerY);
299        overlayCtx.stroke();
300        
301        // Vertical line
302        overlayCtx.beginPath();
303        overlayCtx.moveTo(centerX, centerY - size);
304        overlayCtx.lineTo(centerX, centerY + size);
305        overlayCtx.stroke();
306    }
307
308    // Run aimbot
309    function runAimbot() {
310        const target = findBestTarget();
311        
312        if (target) {
313            currentTarget = target;
314            aimAtTarget(target);
315            
316            if (config.aimbot.autoShoot) {
317                shoot();
318            }
319        } else {
320            currentTarget = null;
321        }
322    }
323
324    // Find best target
325    function findBestTarget() {
326        const centerX = window.innerWidth / 2;
327        const centerY = window.innerHeight / 2;
328        let bestTarget = null;
329        let bestDistance = Infinity;
330        
331        players.forEach(player => {
332            if (!player.isEnemy) return;
333            if (player.distance > config.esp.maxDistance) return;
334            
335            const targetPos = player.bones[config.aimbot.targetBone];
336            const dx = targetPos.x - centerX;
337            const dy = targetPos.y - centerY;
338            const distance = Math.sqrt(dx * dx + dy * dy);
339            
340            if (distance < config.aimbot.fov && distance < bestDistance) {
341                bestDistance = distance;
342                bestTarget = player;
343            }
344        });
345        
346        return bestTarget;
347    }
348
349    // Aim at target
350    function aimAtTarget(target) {
351        const centerX = window.innerWidth / 2;
352        const centerY = window.innerHeight / 2;
353        const targetPos = target.bones[config.aimbot.targetBone];
354        
355        const dx = targetPos.x - centerX;
356        const dy = targetPos.y - centerY;
357        
358        // Apply smoothing
359        const smoothDx = dx * config.aimbot.smoothing;
360        const smoothDy = dy * config.aimbot.smoothing;
361        
362        // Simulate mouse movement
363        simulateMouseMove(smoothDx, smoothDy);
364    }
365
366    // Simulate mouse movement
367    function simulateMouseMove(dx, dy) {
368        // In a real implementation, this would inject mouse movement into the game
369        console.log(`[Aimbot] Aiming: dx=${dx.toFixed(2)}, dy=${dy.toFixed(2)}`);
370    }
371
372    // Shoot
373    function shoot() {
374        // In a real implementation, this would trigger the shoot action
375        console.log('[Aimbot] Shooting at target');
376    }
377
378    // Create settings panel
379    function createSettingsPanel() {
380        const panel = document.createElement('div');
381        panel.id = 'aimbot-settings';
382        panel.style.cssText = `
383            position: fixed;
384            top: 10px;
385            right: 10px;
386            background: rgba(0, 0, 0, 0.8);
387            color: white;
388            padding: 15px;
389            border-radius: 5px;
390            font-family: Arial, sans-serif;
391            font-size: 12px;
392            z-index: 10000;
393            min-width: 200px;
394        `;
395        
396        panel.innerHTML = `
397            <h3 style="margin: 0 0 10px 0; color: #00ff00;">Veck.io Aimbot</h3>
398            <div style="margin-bottom: 8px;">
399                <label><input type="checkbox" id="aimbot-toggle" ${config.aimbot.enabled ? 'checked' : ''}> Aimbot</label>
400            </div>
401            <div style="margin-bottom: 8px;">
402                <label><input type="checkbox" id="esp-toggle" ${config.esp.enabled ? 'checked' : ''}> ESP</label>
403            </div>
404            <div style="margin-bottom: 8px;">
405                <label><input type="checkbox" id="autoshoot-toggle" ${config.aimbot.autoShoot ? 'checked' : ''}> Auto Shoot</label>
406            </div>
407            <div style="margin-bottom: 8px;">
408                <label>FOV: <input type="range" id="fov-slider" min="50" max="300" value="${config.aimbot.fov}" style="width: 100px;"></label>
409                <span id="fov-value">${config.aimbot.fov}</span>
410            </div>
411            <div style="margin-bottom: 8px;">
412                <label>Smoothing: <input type="range" id="smoothing-slider" min="0.1" max="1" step="0.1" value="${config.aimbot.smoothing}" style="width: 100px;"></label>
413                <span id="smoothing-value">${config.aimbot.smoothing}</span>
414            </div>
415            <div style="margin-top: 10px; font-size: 10px; color: #888;">
416                Hold RIGHT MOUSE to activate aimbot
417            </div>
418        `;
419        
420        document.body.appendChild(panel);
421        
422        // Add event listeners
423        document.getElementById('aimbot-toggle').addEventListener('change', (e) => {
424            config.aimbot.enabled = e.target.checked;
425            console.log('[Aimbot] Aimbot:', config.aimbot.enabled ? 'ON' : 'OFF');
426        });
427        
428        document.getElementById('esp-toggle').addEventListener('change', (e) => {
429            config.esp.enabled = e.target.checked;
430            console.log('[Aimbot] ESP:', config.esp.enabled ? 'ON' : 'OFF');
431        });
432        
433        document.getElementById('autoshoot-toggle').addEventListener('change', (e) => {
434            config.aimbot.autoShoot = e.target.checked;
435            console.log('[Aimbot] Auto Shoot:', config.aimbot.autoShoot ? 'ON' : 'OFF');
436        });
437        
438        document.getElementById('fov-slider').addEventListener('input', (e) => {
439            config.aimbot.fov = parseInt(e.target.value);
440            document.getElementById('fov-value').textContent = config.aimbot.fov;
441        });
442        
443        document.getElementById('smoothing-slider').addEventListener('input', (e) => {
444            config.aimbot.smoothing = parseFloat(e.target.value);
445            document.getElementById('smoothing-value').textContent = config.aimbot.smoothing;
446        });
447        
448        console.log('[Aimbot] Settings panel created');
449    }
450
451    // Handle mouse events
452    function setupMouseEvents() {
453        document.addEventListener('mousedown', (e) => {
454            if (e.button === 2) { // Right mouse button
455                isAimbotActive = true;
456                console.log('[Aimbot] Aimbot activated');
457            }
458        });
459        
460        document.addEventListener('mouseup', (e) => {
461            if (e.button === 2) {
462                isAimbotActive = false;
463                console.log('[Aimbot] Aimbot deactivated');
464            }
465        });
466        
467        // Prevent context menu
468        document.addEventListener('contextmenu', (e) => {
469            if (config.aimbot.enabled) {
470                e.preventDefault();
471            }
472        });
473    }
474
475    // Handle window resize
476    function setupWindowResize() {
477        window.addEventListener('resize', () => {
478            if (overlayCanvas) {
479                overlayCanvas.width = window.innerWidth;
480                overlayCanvas.height = window.innerHeight;
481            }
482        });
483    }
484
485    // Initialize
486    function init() {
487        console.log('[Aimbot] Initializing Veck.io Aimbot & ESP...');
488        
489        // Wait for page to load
490        if (document.readyState === 'loading') {
491            document.addEventListener('DOMContentLoaded', init);
492            return;
493        }
494        
495        createOverlay();
496        createSettingsPanel();
497        setupMouseEvents();
498        setupWindowResize();
499        hookUnityGame();
500        
501        console.log('[Aimbot] Initialization complete!');
502    }
503
504    // Start the script
505    init();
506})();