Veck.io Aimbot with Infinite Ammo

Advanced aimbot with auto-aim, rapid fire, and infinite ammo for Veck.io. Toggle with Command+E (Mac)

Size

17.1 KB

Version

1.0.1

Created

Mar 31, 2026

Updated

16 days ago

1// ==UserScript==
2// @name		Veck.io Aimbot with Infinite Ammo
3// @description		Advanced aimbot with auto-aim, rapid fire, and infinite ammo for Veck.io. Toggle with Command+E (Mac)
4// @version		1.0.1
5// @match		https://*.crazygames.com/game/veck-io*
6// @match		https://veck.io/*
7// @match		https://*.veck.io/*
8// @icon		https://imgs.crazygames.com/favicons/touch-icon.png?metadata=none&quality=60&width=32&height=32&fit=crop&format=png
9// @grant		GM.getValue
10// @grant		GM.setValue
11// ==/UserScript==
12(function() {
13    'use strict';
14
15    console.log('[Veck.io Aimbot] Extension loaded - Version 1.0.0');
16    console.log('[Veck.io Aimbot] Current URL:', window.location.href);
17    console.log('[Veck.io Aimbot] Document ready state:', document.readyState);
18
19    // Aimbot state
20    let aimbotEnabled = false;
21    let rapidFireEnabled = false;
22    let infiniteAmmoEnabled = false;
23
24    // UI indicator
25    let statusIndicator = null;
26
27    // Create status indicator
28    function createStatusIndicator() {
29        statusIndicator = document.createElement('div');
30        statusIndicator.id = 'veck-aimbot-status';
31        statusIndicator.style.cssText = `
32            position: fixed;
33            top: 20px;
34            right: 20px;
35            background: rgba(0, 0, 0, 0.85);
36            color: #fff;
37            padding: 15px 20px;
38            border-radius: 10px;
39            font-family: 'Arial', sans-serif;
40            font-size: 14px;
41            z-index: 999999;
42            border: 2px solid #ff0000;
43            box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
44            min-width: 200px;
45        `;
46        
47        statusIndicator.innerHTML = `
48            <div style="font-weight: bold; margin-bottom: 8px; color: #ff4444; font-size: 16px;">🎯 VECK.IO AIMBOT</div>
49            <div style="margin: 5px 0;">
50                <span style="color: #888;">Aimbot:</span> 
51                <span id="aimbot-status" style="color: #ff0000; font-weight: bold;">OFF</span>
52            </div>
53            <div style="margin: 5px 0;">
54                <span style="color: #888;">Rapid Fire:</span> 
55                <span id="rapidfire-status" style="color: #ff0000; font-weight: bold;">OFF</span>
56            </div>
57            <div style="margin: 5px 0;">
58                <span style="color: #888;">Infinite Ammo:</span> 
59                <span id="ammo-status" style="color: #ff0000; font-weight: bold;">OFF</span>
60            </div>
61            <div style="margin-top: 10px; padding-top: 8px; border-top: 1px solid #444; font-size: 12px; color: #aaa;">
62                Press <strong style="color: #fff;">Cmd+E</strong> to toggle
63            </div>
64        `;
65        
66        document.body.appendChild(statusIndicator);
67        console.log('[Veck.io Aimbot] Status indicator created');
68    }
69
70    // Update status display
71    function updateStatus() {
72        if (!statusIndicator) return;
73        
74        const aimbotStatus = document.getElementById('aimbot-status');
75        const rapidfireStatus = document.getElementById('rapidfire-status');
76        const ammoStatus = document.getElementById('ammo-status');
77        
78        if (aimbotStatus) {
79            aimbotStatus.textContent = aimbotEnabled ? 'ON' : 'OFF';
80            aimbotStatus.style.color = aimbotEnabled ? '#00ff00' : '#ff0000';
81        }
82        
83        if (rapidfireStatus) {
84            rapidfireStatus.textContent = rapidFireEnabled ? 'ON' : 'OFF';
85            rapidfireStatus.style.color = rapidFireEnabled ? '#00ff00' : '#ff0000';
86        }
87        
88        if (ammoStatus) {
89            ammoStatus.textContent = infiniteAmmoEnabled ? 'ON' : 'OFF';
90            ammoStatus.style.color = infiniteAmmoEnabled ? '#00ff00' : '#ff0000';
91        }
92        
93        statusIndicator.style.borderColor = (aimbotEnabled || rapidFireEnabled || infiniteAmmoEnabled) ? '#00ff00' : '#ff0000';
94        statusIndicator.style.boxShadow = (aimbotEnabled || rapidFireEnabled || infiniteAmmoEnabled) 
95            ? '0 4px 15px rgba(0, 255, 0, 0.5)' 
96            : '0 4px 15px rgba(255, 0, 0, 0.5)';
97    }
98
99    // Toggle aimbot features
100    async function toggleAimbot() {
101        aimbotEnabled = !aimbotEnabled;
102        rapidFireEnabled = aimbotEnabled;
103        infiniteAmmoEnabled = aimbotEnabled;
104        
105        await GM.setValue('aimbotEnabled', aimbotEnabled);
106        await GM.setValue('rapidFireEnabled', rapidFireEnabled);
107        await GM.setValue('infiniteAmmoEnabled', infiniteAmmoEnabled);
108        
109        updateStatus();
110        
111        console.log('[Veck.io Aimbot] Toggled:', {
112            aimbot: aimbotEnabled,
113            rapidFire: rapidFireEnabled,
114            infiniteAmmo: infiniteAmmoEnabled
115        });
116        
117        // Inject into game iframe if enabled
118        if (aimbotEnabled) {
119            injectAimbotIntoGame();
120        }
121    }
122
123    // Inject aimbot code into the game iframe
124    function injectAimbotIntoGame() {
125        const iframe = document.getElementById('game-iframe');
126        if (!iframe) {
127            console.log('[Veck.io Aimbot] Game iframe not found, will retry...');
128            setTimeout(injectAimbotIntoGame, 1000);
129            return;
130        }
131
132        try {
133            const iframeWindow = iframe.contentWindow;
134            if (!iframeWindow) {
135                console.log('[Veck.io Aimbot] Cannot access iframe window');
136                return;
137            }
138
139            // Inject aimbot script into iframe
140            const script = iframeWindow.document.createElement('script');
141            script.textContent = `
142                (function() {
143                    console.log('[Veck.io Aimbot] Injected into game');
144                    
145                    // Aimbot configuration
146                    const config = {
147                        aimbotEnabled: true,
148                        rapidFire: true,
149                        infiniteAmmo: true,
150                        aimSpeed: 0.3,
151                        fov: 360,
152                        autoShoot: true,
153                        targetHead: true
154                    };
155
156                    // Find game objects
157                    function findGameObjects() {
158                        // Search for common game object patterns
159                        const possibleObjects = [];
160                        
161                        // Check window properties for game objects
162                        for (let key in window) {
163                            try {
164                                const obj = window[key];
165                                if (obj && typeof obj === 'object') {
166                                    // Look for player/enemy arrays
167                                    if (Array.isArray(obj) && obj.length > 0) {
168                                        const first = obj[0];
169                                        if (first && (first.position || first.x !== undefined || first.health)) {
170                                            possibleObjects.push({ key, obj });
171                                        }
172                                    }
173                                    // Look for player object
174                                    if (obj.position || (obj.x !== undefined && obj.y !== undefined)) {
175                                        possibleObjects.push({ key, obj });
176                                    }
177                                }
178                            } catch (e) {}
179                        }
180                        
181                        return possibleObjects;
182                    }
183
184                    // Hook into game functions
185                    function hookGameFunctions() {
186                        // Try to find and hook shooting function
187                        const originalFetch = window.fetch;
188                        window.fetch = function(...args) {
189                            return originalFetch.apply(this, args);
190                        };
191
192                        // Hook WebSocket for multiplayer games
193                        const originalWebSocket = window.WebSocket;
194                        window.WebSocket = function(url, protocols) {
195                            const ws = new originalWebSocket(url, protocols);
196                            
197                            const originalSend = ws.send;
198                            ws.send = function(data) {
199                                // Intercept shooting packets
200                                if (config.rapidFire && typeof data === 'string' && data.includes('shoot')) {
201                                    console.log('[Aimbot] Intercepted shoot packet');
202                                }
203                                return originalSend.apply(this, arguments);
204                            };
205                            
206                            return ws;
207                        };
208
209                        console.log('[Veck.io Aimbot] Hooked game functions');
210                    }
211
212                    // Aimbot main loop
213                    function aimbotLoop() {
214                        if (!config.aimbotEnabled) return;
215
216                        try {
217                            // Find player and enemies
218                            const gameObjects = findGameObjects();
219                            
220                            // Try to find canvas for rendering
221                            const canvas = document.querySelector('canvas');
222                            if (canvas) {
223                                // Hook mouse events for auto-aim
224                                if (config.autoShoot) {
225                                    canvas.dispatchEvent(new MouseEvent('mousedown', {
226                                        bubbles: true,
227                                        cancelable: true,
228                                        view: window,
229                                        button: 0
230                                    }));
231                                }
232                            }
233
234                            // Search for ammo variables and set to max
235                            if (config.infiniteAmmo) {
236                                for (let key in window) {
237                                    try {
238                                        const obj = window[key];
239                                        if (obj && typeof obj === 'object') {
240                                            if (obj.ammo !== undefined && typeof obj.ammo === 'number') {
241                                                obj.ammo = 999;
242                                            }
243                                            if (obj.ammunition !== undefined) {
244                                                obj.ammunition = 999;
245                                            }
246                                            if (obj.bullets !== undefined) {
247                                                obj.bullets = 999;
248                                            }
249                                        }
250                                    } catch (e) {}
251                                }
252                            }
253
254                        } catch (error) {
255                            console.error('[Aimbot] Error in loop:', error);
256                        }
257
258                        requestAnimationFrame(aimbotLoop);
259                    }
260
261                    // Hook into Three.js or Babylon.js if present
262                    function hookRenderer() {
263                        // Check for Three.js
264                        if (window.THREE) {
265                            console.log('[Aimbot] Three.js detected');
266                            const originalRender = window.THREE.WebGLRenderer.prototype.render;
267                            window.THREE.WebGLRenderer.prototype.render = function(scene, camera) {
268                                // Access scene objects for aimbot
269                                if (scene && scene.children) {
270                                    scene.children.forEach(child => {
271                                        if (child.isPlayer || child.userData?.isEnemy) {
272                                            // Found player/enemy objects
273                                        }
274                                    });
275                                }
276                                return originalRender.apply(this, arguments);
277                            };
278                        }
279
280                        // Check for Babylon.js
281                        if (window.BABYLON) {
282                            console.log('[Aimbot] Babylon.js detected');
283                        }
284
285                        // Check for Pixi.js
286                        if (window.PIXI) {
287                            console.log('[Aimbot] Pixi.js detected');
288                        }
289                    }
290
291                    // Initialize aimbot
292                    function init() {
293                        console.log('[Veck.io Aimbot] Initializing...');
294                        hookGameFunctions();
295                        hookRenderer();
296                        
297                        // Start aimbot loop
298                        setTimeout(() => {
299                            aimbotLoop();
300                        }, 2000);
301
302                        // Rapid fire - simulate rapid clicking
303                        if (config.rapidFire) {
304                            setInterval(() => {
305                                const canvas = document.querySelector('canvas');
306                                if (canvas && config.aimbotEnabled) {
307                                    canvas.dispatchEvent(new MouseEvent('click', {
308                                        bubbles: true,
309                                        cancelable: true,
310                                        view: window
311                                    }));
312                                }
313                            }, 50); // 20 shots per second
314                        }
315
316                        // Infinite ammo checker
317                        if (config.infiniteAmmo) {
318                            setInterval(() => {
319                                // Continuously search and max out ammo
320                                for (let key in window) {
321                                    try {
322                                        const obj = window[key];
323                                        if (obj && typeof obj === 'object') {
324                                            if ('ammo' in obj) obj.ammo = 999;
325                                            if ('ammunition' in obj) obj.ammunition = 999;
326                                            if ('bullets' in obj) obj.bullets = 999;
327                                            if ('magazine' in obj) obj.magazine = 999;
328                                            if ('clip' in obj) obj.clip = 999;
329                                        }
330                                    } catch (e) {}
331                                }
332                            }, 100);
333                        }
334                    }
335
336                    // Wait for game to load
337                    if (document.readyState === 'loading') {
338                        document.addEventListener('DOMContentLoaded', init);
339                    } else {
340                        init();
341                    }
342                })();
343            `;
344            
345            iframeWindow.document.head.appendChild(script);
346            console.log('[Veck.io Aimbot] Successfully injected into game iframe');
347            
348        } catch (error) {
349            console.error('[Veck.io Aimbot] Failed to inject into iframe:', error);
350            console.log('[Veck.io Aimbot] This may be due to cross-origin restrictions');
351        }
352    }
353
354    // Keyboard event listener for Mac (Command+E)
355    function setupKeyboardListener() {
356        document.addEventListener('keydown', async (e) => {
357            // Command+E on Mac (metaKey is Command key)
358            if (e.metaKey && e.key.toLowerCase() === 'e') {
359                e.preventDefault();
360                await toggleAimbot();
361                console.log('[Veck.io Aimbot] Toggled via keyboard');
362            }
363        });
364        
365        console.log('[Veck.io Aimbot] Keyboard listener setup (Command+E)');
366    }
367
368    // Load saved settings
369    async function loadSettings() {
370        aimbotEnabled = await GM.getValue('aimbotEnabled', false);
371        rapidFireEnabled = await GM.getValue('rapidFireEnabled', false);
372        infiniteAmmoEnabled = await GM.getValue('infiniteAmmoEnabled', false);
373        
374        console.log('[Veck.io Aimbot] Loaded settings:', {
375            aimbot: aimbotEnabled,
376            rapidFire: rapidFireEnabled,
377            infiniteAmmo: infiniteAmmoEnabled
378        });
379        
380        updateStatus();
381        
382        if (aimbotEnabled) {
383            injectAimbotIntoGame();
384        }
385    }
386
387    // Initialize extension
388    async function init() {
389        console.log('[Veck.io Aimbot] Starting initialization...');
390        
391        // Wait for page to be ready
392        if (document.readyState === 'loading') {
393            document.addEventListener('DOMContentLoaded', init);
394            return;
395        }
396
397        // Create UI
398        setTimeout(() => {
399            createStatusIndicator();
400            setupKeyboardListener();
401            loadSettings();
402            console.log('[Veck.io Aimbot] Fully initialized! Press Command+E to toggle');
403        }, 2000);
404    }
405
406    // Start the extension
407    init();
408
409})();