Veck.io Aimbot

A new extension

Size

9.0 KB

Version

1.0.1

Created

Mar 27, 2026

Updated

20 days ago

1// ==UserScript==
2// @name		Veck.io Aimbot
3// @description		A new extension
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    console.log('Veck.io Aimbot loaded');
12
13    let aimbotEnabled = true;
14    let targetLocked = true;
15    let currentTarget = null;
16
17    // Configuration
18    const config = {
19        toggleKey: 'e', // Press 'E' to toggle aimbot
20        lockKey: 'q', // Press 'Q' to lock onto nearest target
21        fov: 200, // Field of view for target detection (pixels from crosshair)
22        smoothing: 0.3, // Aim smoothing (0 = instant, 1 = very smooth)
23        autoShoot: false // Set to true if you want auto-fire
24    };
25
26    // Create UI indicator
27    function createUI() {
28        const indicator = document.createElement('div');
29        indicator.id = 'aimbot-indicator';
30        indicator.style.cssText = `
31            position: fixed;
32            top: 20px;
33            right: 20px;
34            background: rgba(0, 0, 0, 0.8);
35            color: #fff;
36            padding: 12px 20px;
37            border-radius: 8px;
38            font-family: Arial, sans-serif;
39            font-size: 14px;
40            z-index: 10000;
41            border: 2px solid #ff0000;
42            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
43        `;
44        indicator.innerHTML = `
45            <div style="font-weight: bold; margin-bottom: 5px;">🎯 Aimbot</div>
46            <div id="aimbot-status">Status: <span style="color: #ff4444;">OFF</span></div>
47            <div style="font-size: 11px; margin-top: 5px; opacity: 0.8;">
48                Toggle: E | Lock: Q
49            </div>
50        `;
51        document.body.appendChild(indicator);
52        console.log('Aimbot UI created');
53    }
54
55    // Update UI status
56    function updateUI() {
57        const statusElement = document.getElementById('aimbot-status');
58        if (statusElement) {
59            if (targetLocked && currentTarget) {
60                statusElement.innerHTML = 'Status: <span style="color: #44ff44;">LOCKED</span>';
61            } else if (aimbotEnabled) {
62                statusElement.innerHTML = 'Status: <span style="color: #ffaa00;">ACTIVE</span>';
63            } else {
64                statusElement.innerHTML = 'Status: <span style="color: #ff4444;">OFF</span>';
65            }
66        }
67    }
68
69    // Get player position from game
70    function getPlayerPosition() {
71        try {
72            // Try to find player position from canvas or game objects
73            const canvas = document.querySelector('canvas');
74            if (canvas) {
75                return {
76                    x: canvas.width / 2,
77                    y: canvas.height / 2
78                };
79            }
80        } catch (e) {
81            console.error('Error getting player position:', e);
82        }
83        return null;
84    }
85
86    // Find enemies in the game
87    function findEnemies() {
88        try {
89            // Veck.io uses WebGL rendering, we need to hook into the game's rendering
90            // This will search for enemy player objects in the game's memory
91            const enemies = [];
92            
93            // Try to access game objects through window
94            for (let key in unsafeWindow) {
95                try {
96                    const obj = unsafeWindow[key];
97                    if (obj && typeof obj === 'object' && obj.players) {
98                        // Found potential game state object
99                        if (Array.isArray(obj.players)) {
100                            return obj.players.filter(p => p && !p.isLocalPlayer);
101                        } else if (typeof obj.players === 'object') {
102                            return Object.values(obj.players).filter(p => p && !p.isLocalPlayer);
103                        }
104                    }
105                } catch (e) {
106                    // Skip inaccessible properties
107                }
108            }
109            
110            return enemies;
111        } catch (e) {
112            console.error('Error finding enemies:', e);
113            return [];
114        }
115    }
116
117    // Calculate distance between two points
118    function getDistance(x1, y1, x2, y2) {
119        return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
120    }
121
122    // Find nearest enemy
123    function findNearestEnemy() {
124        const playerPos = getPlayerPosition();
125        if (!playerPos) return null;
126
127        const enemies = findEnemies();
128        if (enemies.length === 0) return null;
129
130        let nearest = null;
131        let minDistance = config.fov;
132
133        enemies.forEach(enemy => {
134            if (enemy && enemy.position) {
135                const distance = getDistance(
136                    playerPos.x, playerPos.y,
137                    enemy.position.x, enemy.position.y
138                );
139                
140                if (distance < minDistance) {
141                    minDistance = distance;
142                    nearest = enemy;
143                }
144            }
145        });
146
147        return nearest;
148    }
149
150    // Aim at target
151    function aimAtTarget(target) {
152        if (!target || !target.position) return;
153
154        try {
155            const playerPos = getPlayerPosition();
156            if (!playerPos) return;
157
158            // Calculate angle to target
159            const dx = target.position.x - playerPos.x;
160            const dy = target.position.y - playerPos.y;
161            const angle = Math.atan2(dy, dx);
162
163            // Try to set camera/aim direction
164            // This will attempt to hook into the game's mouse movement
165            const canvas = document.querySelector('canvas');
166            if (canvas) {
167                // Simulate mouse movement to aim
168                const centerX = canvas.width / 2;
169                const centerY = canvas.height / 2;
170                
171                const targetX = centerX + Math.cos(angle) * 100;
172                const targetY = centerY + Math.sin(angle) * 100;
173
174                // Create and dispatch mouse move event
175                const moveEvent = new MouseEvent('mousemove', {
176                    clientX: targetX,
177                    clientY: targetY,
178                    bubbles: true,
179                    cancelable: true
180                });
181                canvas.dispatchEvent(moveEvent);
182
183                // Auto-shoot if enabled
184                if (config.autoShoot) {
185                    const clickEvent = new MouseEvent('mousedown', {
186                        button: 0,
187                        bubbles: true,
188                        cancelable: true
189                    });
190                    canvas.dispatchEvent(clickEvent);
191                }
192            }
193        } catch (e) {
194            console.error('Error aiming at target:', e);
195        }
196    }
197
198    // Main aimbot loop
199    function aimbotLoop() {
200        if (!aimbotEnabled) return;
201
202        try {
203            if (targetLocked && currentTarget) {
204                // Keep aiming at locked target
205                aimAtTarget(currentTarget);
206            } else if (aimbotEnabled) {
207                // Find and aim at nearest enemy
208                const nearest = findNearestEnemy();
209                if (nearest) {
210                    currentTarget = nearest;
211                    aimAtTarget(nearest);
212                }
213            }
214        } catch (e) {
215            console.error('Aimbot loop error:', e);
216        }
217
218        updateUI();
219    }
220
221    // Keyboard controls
222    document.addEventListener('keydown', (e) => {
223        // Toggle aimbot with 'E' key
224        if (e.key.toLowerCase() === config.toggleKey) {
225            aimbotEnabled = !aimbotEnabled;
226            if (!aimbotEnabled) {
227                targetLocked = false;
228                currentTarget = null;
229            }
230            updateUI();
231            console.log('Aimbot toggled:', aimbotEnabled ? 'ON' : 'OFF');
232        }
233
234        // Lock target with 'Q' key
235        if (e.key.toLowerCase() === config.lockKey && aimbotEnabled) {
236            if (!targetLocked) {
237                const nearest = findNearestEnemy();
238                if (nearest) {
239                    currentTarget = nearest;
240                    targetLocked = true;
241                    console.log('Target locked');
242                }
243            } else {
244                targetLocked = false;
245                currentTarget = null;
246                console.log('Target unlocked');
247            }
248            updateUI();
249        }
250    });
251
252    // Initialize
253    function init() {
254        console.log('Initializing Veck.io Aimbot...');
255        
256        // Wait for game to load
257        const checkGame = setInterval(() => {
258            const canvas = document.querySelector('canvas');
259            if (canvas) {
260                console.log('Game canvas found, starting aimbot');
261                clearInterval(checkGame);
262                
263                createUI();
264                
265                // Start aimbot loop
266                setInterval(aimbotLoop, 16); // ~60 FPS
267                
268                console.log('Aimbot ready! Press E to toggle, Q to lock target');
269            }
270        }, 1000);
271    }
272
273    // Start when page loads
274    if (document.readyState === 'loading') {
275        document.addEventListener('DOMContentLoaded', init);
276    } else {
277        init();
278    }
279})();
Veck.io Aimbot | Robomonkey