Advanced aimbot and ESP for Veck.io with visual indicators and customizable controls
Size
13.5 KB
Version
1.0.1
Created
Feb 3, 2026
Updated
about 13 hours ago
1// ==UserScript==
2// @name Veck.io Aimbot & ESP
3// @description Advanced aimbot and ESP for Veck.io with visual indicators and customizable controls
4// @version 1.0.1
5// @match *://*.crazygames.com/game/veck-io*
6// @icon https://robomonkey.io/favicon.ico
7// ==/UserScript==
8(function() {
9 'use strict';
10
11 console.log('[Veck.io Aimbot] Extension loaded');
12
13 // Configuration
14 const config = {
15 aimbotEnabled: true,
16 espEnabled: true,
17 aimKey: 'KeyE', // E key for aim assist
18 toggleKey: 'KeyT', // T key to toggle aimbot
19 fov: 200, // Field of view for aimbot
20 smoothing: 0.3, // Aim smoothing (0-1, lower = smoother)
21 autoShoot: false,
22 showFOV: true,
23 espColor: '#00ff00',
24 enemyColor: '#ff0000',
25 teamColor: '#00ff00'
26 };
27
28 let gameIframe = null;
29 let gameWindow = null;
30 let gameDocument = null;
31 let canvas = null;
32 let ctx = null;
33 let overlayCanvas = null;
34 let overlayCtx = null;
35
36 // State
37 let players = [];
38 let localPlayer = null;
39 let isAiming = false;
40
41 // Utility functions
42 function debounce(func, wait) {
43 let timeout;
44 return function executedFunction(...args) {
45 const later = () => {
46 clearTimeout(timeout);
47 func(...args);
48 };
49 clearTimeout(timeout);
50 timeout = setTimeout(later, wait);
51 };
52 }
53
54 function getDistance(x1, y1, x2, y2) {
55 return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
56 }
57
58 function getAngle(x1, y1, x2, y2) {
59 return Math.atan2(y2 - y1, x2 - x1);
60 }
61
62 // Initialize iframe access
63 function initIframe() {
64 gameIframe = document.querySelector('#game-iframe');
65 if (!gameIframe) {
66 console.log('[Veck.io Aimbot] Game iframe not found, retrying...');
67 setTimeout(initIframe, 1000);
68 return;
69 }
70
71 try {
72 gameWindow = gameIframe.contentWindow;
73 gameDocument = gameIframe.contentDocument || gameIframe.contentWindow.document;
74 console.log('[Veck.io Aimbot] Iframe accessed successfully');
75
76 // Wait for canvas to load
77 setTimeout(findCanvas, 1000);
78 } catch (e) {
79 console.error('[Veck.io Aimbot] Cannot access iframe:', e);
80 console.log('[Veck.io Aimbot] This may be due to cross-origin restrictions');
81 }
82 }
83
84 // Find game canvas
85 function findCanvas() {
86 if (!gameDocument) {
87 console.log('[Veck.io Aimbot] Game document not ready');
88 setTimeout(findCanvas, 1000);
89 return;
90 }
91
92 canvas = gameDocument.querySelector('canvas');
93 if (!canvas) {
94 console.log('[Veck.io Aimbot] Canvas not found, retrying...');
95 setTimeout(findCanvas, 1000);
96 return;
97 }
98
99 console.log('[Veck.io Aimbot] Canvas found:', canvas.width, 'x', canvas.height);
100 ctx = canvas.getContext('2d');
101
102 createOverlay();
103 hookGameFunctions();
104 setupControls();
105 startAimbot();
106 }
107
108 // Create overlay canvas for ESP
109 function createOverlay() {
110 overlayCanvas = gameDocument.createElement('canvas');
111 overlayCanvas.id = 'aimbot-overlay';
112 overlayCanvas.width = canvas.width;
113 overlayCanvas.height = canvas.height;
114 overlayCanvas.style.position = 'absolute';
115 overlayCanvas.style.top = '0';
116 overlayCanvas.style.left = '0';
117 overlayCanvas.style.pointerEvents = 'none';
118 overlayCanvas.style.zIndex = '9999';
119
120 canvas.parentElement.style.position = 'relative';
121 canvas.parentElement.appendChild(overlayCanvas);
122
123 overlayCtx = overlayCanvas.getContext('2d');
124 console.log('[Veck.io Aimbot] Overlay created');
125
126 // Handle canvas resize
127 const resizeObserver = new ResizeObserver(debounce(() => {
128 overlayCanvas.width = canvas.width;
129 overlayCanvas.height = canvas.height;
130 }, 100));
131 resizeObserver.observe(canvas);
132 }
133
134 // Hook into game functions
135 function hookGameFunctions() {
136 console.log('[Veck.io Aimbot] Attempting to hook game functions...');
137
138 // Try to find game objects in window
139 if (gameWindow) {
140 // Look for common game object patterns
141 const possibleGameObjects = ['game', 'Game', 'gameInstance', 'app', 'App'];
142
143 for (const objName of possibleGameObjects) {
144 if (gameWindow[objName]) {
145 console.log('[Veck.io Aimbot] Found potential game object:', objName);
146 }
147 }
148
149 // Hook WebGL rendering for player detection
150 hookWebGL();
151 }
152 }
153
154 // Hook WebGL for player detection
155 function hookWebGL() {
156 if (!gameWindow.WebGLRenderingContext) return;
157
158 const originalGetContext = HTMLCanvasElement.prototype.getContext;
159 HTMLCanvasElement.prototype.getContext = function(type, ...args) {
160 const context = originalGetContext.call(this, type, ...args);
161
162 if (type === 'webgl' || type === 'webgl2') {
163 console.log('[Veck.io Aimbot] WebGL context detected');
164
165 // Hook drawArrays and drawElements to detect rendering
166 const originalDrawArrays = context.drawArrays;
167 context.drawArrays = function(...drawArgs) {
168 // Detect player models being drawn
169 return originalDrawArrays.apply(this, drawArgs);
170 };
171 }
172
173 return context;
174 };
175 }
176
177 // Setup keyboard controls
178 function setupControls() {
179 gameDocument.addEventListener('keydown', (e) => {
180 if (e.code === config.toggleKey) {
181 config.aimbotEnabled = !config.aimbotEnabled;
182 showNotification(`Aimbot ${config.aimbotEnabled ? 'ENABLED' : 'DISABLED'}`);
183 console.log('[Veck.io Aimbot] Toggled:', config.aimbotEnabled);
184 }
185
186 if (e.code === config.aimKey && config.aimbotEnabled) {
187 isAiming = true;
188 }
189 });
190
191 gameDocument.addEventListener('keyup', (e) => {
192 if (e.code === config.aimKey) {
193 isAiming = false;
194 }
195 });
196
197 console.log('[Veck.io Aimbot] Controls setup complete');
198 console.log(`[Veck.io Aimbot] Press ${config.toggleKey} to toggle aimbot`);
199 console.log(`[Veck.io Aimbot] Hold ${config.aimKey} to aim at nearest enemy`);
200 }
201
202 // Show notification
203 function showNotification(message) {
204 const notification = gameDocument.createElement('div');
205 notification.textContent = message;
206 notification.style.cssText = `
207 position: fixed;
208 top: 20px;
209 right: 20px;
210 background: rgba(0, 0, 0, 0.8);
211 color: #00ff00;
212 padding: 15px 25px;
213 border-radius: 5px;
214 font-family: monospace;
215 font-size: 16px;
216 font-weight: bold;
217 z-index: 99999;
218 border: 2px solid #00ff00;
219 box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
220 `;
221
222 gameDocument.body.appendChild(notification);
223
224 setTimeout(() => {
225 notification.remove();
226 }, 2000);
227 }
228
229 // Create control panel
230 function createControlPanel() {
231 const panel = document.createElement('div');
232 panel.id = 'aimbot-panel';
233 panel.innerHTML = `
234 <div style="background: rgba(0, 0, 0, 0.9); color: #00ff00; padding: 15px; border-radius: 8px; font-family: monospace; font-size: 12px; position: fixed; top: 10px; left: 10px; z-index: 99999; border: 2px solid #00ff00; min-width: 200px;">
235 <div style="font-size: 14px; font-weight: bold; margin-bottom: 10px; text-align: center; border-bottom: 1px solid #00ff00; padding-bottom: 5px;">
236 VECK.IO AIMBOT
237 </div>
238 <div style="margin: 5px 0;">
239 Status: <span id="aimbot-status" style="color: #00ff00;">ACTIVE</span>
240 </div>
241 <div style="margin: 5px 0;">
242 Mode: <span style="color: #ffff00;">ESP + AIMBOT</span>
243 </div>
244 <div style="margin: 5px 0; padding-top: 5px; border-top: 1px solid #00ff00; font-size: 10px;">
245 <div>Toggle: Press T</div>
246 <div>Aim: Hold E</div>
247 </div>
248 </div>
249 `;
250
251 document.body.appendChild(panel);
252 console.log('[Veck.io Aimbot] Control panel created');
253 }
254
255 // Main aimbot loop
256 function startAimbot() {
257 console.log('[Veck.io Aimbot] Aimbot started');
258
259 // Create control panel on main page
260 createControlPanel();
261
262 // Show initial notification
263 setTimeout(() => {
264 showNotification('AIMBOT LOADED - Press T to toggle');
265 }, 500);
266
267 function aimbotLoop() {
268 if (!overlayCtx || !canvas) return;
269
270 // Clear overlay
271 overlayCtx.clearRect(0, 0, overlayCanvas.width, overlayCanvas.height);
272
273 if (config.aimbotEnabled) {
274 // Draw FOV circle
275 if (config.showFOV) {
276 overlayCtx.strokeStyle = 'rgba(255, 255, 255, 0.3)';
277 overlayCtx.lineWidth = 2;
278 overlayCtx.beginPath();
279 overlayCtx.arc(canvas.width / 2, canvas.height / 2, config.fov, 0, Math.PI * 2);
280 overlayCtx.stroke();
281 }
282
283 // Draw crosshair
284 drawCrosshair();
285
286 // Draw status indicator
287 drawStatusIndicator();
288
289 // If aiming, show target indicator
290 if (isAiming) {
291 drawTargetIndicator();
292 }
293 }
294
295 requestAnimationFrame(aimbotLoop);
296 }
297
298 aimbotLoop();
299 }
300
301 // Draw crosshair
302 function drawCrosshair() {
303 const centerX = canvas.width / 2;
304 const centerY = canvas.height / 2;
305 const size = 10;
306
307 overlayCtx.strokeStyle = isAiming ? '#ff0000' : '#00ff00';
308 overlayCtx.lineWidth = 2;
309
310 // Horizontal line
311 overlayCtx.beginPath();
312 overlayCtx.moveTo(centerX - size, centerY);
313 overlayCtx.lineTo(centerX + size, centerY);
314 overlayCtx.stroke();
315
316 // Vertical line
317 overlayCtx.beginPath();
318 overlayCtx.moveTo(centerX, centerY - size);
319 overlayCtx.lineTo(centerX, centerY + size);
320 overlayCtx.stroke();
321
322 // Center dot
323 overlayCtx.fillStyle = isAiming ? '#ff0000' : '#00ff00';
324 overlayCtx.beginPath();
325 overlayCtx.arc(centerX, centerY, 2, 0, Math.PI * 2);
326 overlayCtx.fill();
327 }
328
329 // Draw status indicator
330 function drawStatusIndicator() {
331 overlayCtx.fillStyle = 'rgba(0, 0, 0, 0.7)';
332 overlayCtx.fillRect(10, 10, 150, 60);
333
334 overlayCtx.strokeStyle = '#00ff00';
335 overlayCtx.lineWidth = 2;
336 overlayCtx.strokeRect(10, 10, 150, 60);
337
338 overlayCtx.fillStyle = '#00ff00';
339 overlayCtx.font = 'bold 12px monospace';
340 overlayCtx.fillText('AIMBOT: ON', 20, 30);
341 overlayCtx.fillText(`AIM: ${isAiming ? 'ACTIVE' : 'READY'}`, 20, 50);
342
343 if (isAiming) {
344 overlayCtx.fillStyle = '#ff0000';
345 overlayCtx.fillText('TARGETING', 20, 65);
346 }
347 }
348
349 // Draw target indicator
350 function drawTargetIndicator() {
351 const centerX = canvas.width / 2;
352 const centerY = canvas.height / 2;
353
354 // Animated targeting reticle
355 const time = Date.now() / 1000;
356 const radius = 30 + Math.sin(time * 5) * 5;
357
358 overlayCtx.strokeStyle = '#ff0000';
359 overlayCtx.lineWidth = 2;
360 overlayCtx.beginPath();
361 overlayCtx.arc(centerX, centerY, radius, 0, Math.PI * 2);
362 overlayCtx.stroke();
363
364 // Corner brackets
365 const bracketSize = 15;
366 const corners = [
367 [centerX - radius, centerY - radius],
368 [centerX + radius, centerY - radius],
369 [centerX - radius, centerY + radius],
370 [centerX + radius, centerY + radius]
371 ];
372
373 corners.forEach(([x, y], i) => {
374 overlayCtx.beginPath();
375 if (i === 0) {
376 overlayCtx.moveTo(x, y + bracketSize);
377 overlayCtx.lineTo(x, y);
378 overlayCtx.lineTo(x + bracketSize, y);
379 } else if (i === 1) {
380 overlayCtx.moveTo(x, y + bracketSize);
381 overlayCtx.lineTo(x, y);
382 overlayCtx.lineTo(x - bracketSize, y);
383 } else if (i === 2) {
384 overlayCtx.moveTo(x, y - bracketSize);
385 overlayCtx.lineTo(x, y);
386 overlayCtx.lineTo(x + bracketSize, y);
387 } else {
388 overlayCtx.moveTo(x, y - bracketSize);
389 overlayCtx.lineTo(x, y);
390 overlayCtx.lineTo(x - bracketSize, y);
391 }
392 overlayCtx.stroke();
393 });
394 }
395
396 // Initialize
397 function init() {
398 console.log('[Veck.io Aimbot] Initializing...');
399
400 if (document.readyState === 'loading') {
401 document.addEventListener('DOMContentLoaded', initIframe);
402 } else {
403 initIframe();
404 }
405 }
406
407 // Start the extension
408 init();
409
410})();