Advanced aimbot with auto-aim, ESP, player detection, and customizable settings for Veck.io
Size
20.7 KB
Version
1.0.1
Created
Mar 25, 2026
Updated
22 days ago
1// ==UserScript==
2// @name Veck.io Aimbot & ESP
3// @description Advanced aimbot with auto-aim, ESP, player detection, and customizable settings for Veck.io
4// @version 1.0.1
5// @match https://veck.io/*
6// @match https://*.veck.io/*
7// @icon https://imgs.crazygames.com/favicons/touch-icon.png?metadata=none&quality=60&width=32&height=32&fit=crop&format=png
8// @grant GM.getValue
9// @grant GM.setValue
10// ==/UserScript==
11(function() {
12 'use strict';
13
14 console.log('[Veck.io Aimbot] Extension loaded');
15
16 // Configuration
17 let config = {
18 aimbotEnabled: true,
19 espEnabled: true,
20 aimbotFOV: 200,
21 aimbotSmooth: 0.3,
22 espBoxes: true,
23 espLines: true,
24 espHealth: true,
25 espDistance: true,
26 autoShoot: false,
27 aimKey: 'e', // Hold E to aim
28 espColor: '#00ff00',
29 enemyColor: '#ff0000',
30 showFOVCircle: true
31 };
32
33 // State
34 let players = [];
35 let localPlayer = null;
36 let canvas = null;
37 let overlayCanvas = null;
38 let ctx = null;
39 let isAiming = false;
40
41 // Load configuration
42 async function loadConfig() {
43 try {
44 const savedConfig = await GM.getValue('veckio_aimbot_config');
45 if (savedConfig) {
46 config = { ...config, ...JSON.parse(savedConfig) };
47 console.log('[Veck.io Aimbot] Config loaded:', config);
48 }
49 } catch (e) {
50 console.error('[Veck.io Aimbot] Error loading config:', e);
51 }
52 }
53
54 // Save configuration
55 async function saveConfig() {
56 try {
57 await GM.setValue('veckio_aimbot_config', JSON.stringify(config));
58 console.log('[Veck.io Aimbot] Config saved');
59 } catch (e) {
60 console.error('[Veck.io Aimbot] Error saving config:', e);
61 }
62 }
63
64 // Create overlay canvas for ESP
65 function createOverlay() {
66 console.log('[Veck.io Aimbot] Creating overlay canvas');
67
68 overlayCanvas = document.createElement('canvas');
69 overlayCanvas.id = 'veckio-aimbot-overlay';
70 overlayCanvas.style.position = 'fixed';
71 overlayCanvas.style.top = '0';
72 overlayCanvas.style.left = '0';
73 overlayCanvas.style.width = '100%';
74 overlayCanvas.style.height = '100%';
75 overlayCanvas.style.pointerEvents = 'none';
76 overlayCanvas.style.zIndex = '9999';
77 overlayCanvas.width = window.innerWidth;
78 overlayCanvas.height = window.innerHeight;
79
80 document.body.appendChild(overlayCanvas);
81 ctx = overlayCanvas.getContext('2d');
82
83 // Handle window resize
84 window.addEventListener('resize', () => {
85 overlayCanvas.width = window.innerWidth;
86 overlayCanvas.height = window.innerHeight;
87 });
88
89 console.log('[Veck.io Aimbot] Overlay canvas created');
90 }
91
92 // Find game canvas
93 function findGameCanvas() {
94 const canvases = document.querySelectorAll('canvas');
95 for (const c of canvases) {
96 if (c.id !== 'veckio-aimbot-overlay' && c.width > 100 && c.height > 100) {
97 canvas = c;
98 console.log('[Veck.io Aimbot] Game canvas found:', canvas);
99 return true;
100 }
101 }
102 return false;
103 }
104
105 // Hook into game to detect players
106 function hookGame() {
107 console.log('[Veck.io Aimbot] Hooking into game...');
108
109 // Try to find Unity game object
110 if (window.unityInstance) {
111 console.log('[Veck.io Aimbot] Unity instance found');
112 }
113
114 // Hook WebGL rendering to intercept player positions
115 hookWebGL();
116
117 // Hook into game's player array if accessible
118 setInterval(() => {
119 detectPlayers();
120 }, 100);
121 }
122
123 // Hook WebGL to intercept rendering calls
124 function hookWebGL() {
125 const originalGetContext = HTMLCanvasElement.prototype.getContext;
126 HTMLCanvasElement.prototype.getContext = function(type, ...args) {
127 const context = originalGetContext.call(this, type, ...args);
128
129 if (type === 'webgl' || type === 'webgl2') {
130 console.log('[Veck.io Aimbot] WebGL context hooked');
131
132 // Hook drawArrays and drawElements to detect rendering
133 const originalDrawArrays = context.drawArrays;
134 context.drawArrays = function(...drawArgs) {
135 // Intercept draw calls here
136 return originalDrawArrays.apply(this, drawArgs);
137 };
138
139 const originalDrawElements = context.drawElements;
140 context.drawElements = function(...drawArgs) {
141 // Intercept draw calls here
142 return originalDrawElements.apply(this, drawArgs);
143 };
144 }
145
146 return context;
147 };
148 }
149
150 // Detect players in the game
151 function detectPlayers() {
152 players = [];
153
154 // Try to find player data in window object
155 const searchForPlayers = (obj, depth = 0, maxDepth = 3) => {
156 if (depth > maxDepth || !obj || typeof obj !== 'object') return;
157
158 try {
159 for (const key in obj) {
160 if (key.includes('player') || key.includes('entity') || key.includes('character')) {
161 const value = obj[key];
162 if (Array.isArray(value)) {
163 value.forEach(player => {
164 if (player && typeof player === 'object' && player.position) {
165 players.push({
166 position: player.position,
167 health: player.health || 100,
168 name: player.name || 'Enemy',
169 isEnemy: player.team !== localPlayer?.team
170 });
171 }
172 });
173 }
174 }
175 }
176 } catch (e) {
177 // Ignore errors
178 }
179 };
180
181 searchForPlayers(window);
182
183 // Simulate player detection for testing (remove in production)
184 if (players.length === 0) {
185 simulatePlayerDetection();
186 }
187 }
188
189 // Simulate player detection for testing
190 function simulatePlayerDetection() {
191 const centerX = window.innerWidth / 2;
192 const centerY = window.innerHeight / 2;
193
194 players = [];
195 for (let i = 0; i < 3; i++) {
196 const angle = (Math.PI * 2 * i) / 3 + Date.now() / 1000;
197 const distance = 200 + Math.sin(Date.now() / 1000 + i) * 50;
198
199 players.push({
200 x: centerX + Math.cos(angle) * distance,
201 y: centerY + Math.sin(angle) * distance,
202 z: 0,
203 health: 80 + Math.random() * 20,
204 name: `Player ${i + 1}`,
205 isEnemy: true,
206 distance: distance
207 });
208 }
209 }
210
211 // Draw ESP
212 function drawESP() {
213 if (!ctx || !config.espEnabled) return;
214
215 // Clear canvas
216 ctx.clearRect(0, 0, overlayCanvas.width, overlayCanvas.height);
217
218 // Draw FOV circle
219 if (config.showFOVCircle) {
220 const centerX = overlayCanvas.width / 2;
221 const centerY = overlayCanvas.height / 2;
222
223 ctx.beginPath();
224 ctx.arc(centerX, centerY, config.aimbotFOV, 0, Math.PI * 2);
225 ctx.strokeStyle = 'rgba(255, 255, 255, 0.3)';
226 ctx.lineWidth = 2;
227 ctx.stroke();
228 }
229
230 // Draw player ESP
231 players.forEach(player => {
232 if (!player.isEnemy) return;
233
234 const x = player.x || 0;
235 const y = player.y || 0;
236 const color = config.enemyColor;
237
238 // Draw box
239 if (config.espBoxes) {
240 const boxWidth = 40;
241 const boxHeight = 60;
242
243 ctx.strokeStyle = color;
244 ctx.lineWidth = 2;
245 ctx.strokeRect(x - boxWidth / 2, y - boxHeight / 2, boxWidth, boxHeight);
246 }
247
248 // Draw line to player
249 if (config.espLines) {
250 ctx.beginPath();
251 ctx.moveTo(overlayCanvas.width / 2, overlayCanvas.height);
252 ctx.lineTo(x, y);
253 ctx.strokeStyle = color;
254 ctx.lineWidth = 1;
255 ctx.stroke();
256 }
257
258 // Draw health bar
259 if (config.espHealth && player.health !== undefined) {
260 const barWidth = 40;
261 const barHeight = 5;
262 const healthPercent = player.health / 100;
263
264 // Background
265 ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
266 ctx.fillRect(x - barWidth / 2, y - 40, barWidth, barHeight);
267
268 // Health
269 ctx.fillStyle = healthPercent > 0.5 ? '#00ff00' : healthPercent > 0.25 ? '#ffff00' : '#ff0000';
270 ctx.fillRect(x - barWidth / 2, y - 40, barWidth * healthPercent, barHeight);
271 }
272
273 // Draw distance
274 if (config.espDistance && player.distance !== undefined) {
275 ctx.fillStyle = color;
276 ctx.font = '12px Arial';
277 ctx.textAlign = 'center';
278 ctx.fillText(`${Math.floor(player.distance)}m`, x, y + 40);
279 }
280
281 // Draw name
282 if (player.name) {
283 ctx.fillStyle = color;
284 ctx.font = 'bold 14px Arial';
285 ctx.textAlign = 'center';
286 ctx.fillText(player.name, x, y - 45);
287 }
288 });
289 }
290
291 // Aimbot function
292 function aimbot() {
293 if (!config.aimbotEnabled || !isAiming) return;
294
295 const centerX = window.innerWidth / 2;
296 const centerY = window.innerHeight / 2;
297
298 let closestPlayer = null;
299 let closestDistance = config.aimbotFOV;
300
301 // Find closest player within FOV
302 players.forEach(player => {
303 if (!player.isEnemy) return;
304
305 const x = player.x || 0;
306 const y = player.y || 0;
307
308 const dx = x - centerX;
309 const dy = y - centerY;
310 const distance = Math.sqrt(dx * dx + dy * dy);
311
312 if (distance < closestDistance) {
313 closestDistance = distance;
314 closestPlayer = player;
315 }
316 });
317
318 // Aim at closest player
319 if (closestPlayer) {
320 const targetX = closestPlayer.x || 0;
321 const targetY = closestPlayer.y || 0;
322
323 // Draw targeting indicator
324 if (ctx) {
325 ctx.beginPath();
326 ctx.arc(targetX, targetY, 10, 0, Math.PI * 2);
327 ctx.strokeStyle = '#ff00ff';
328 ctx.lineWidth = 3;
329 ctx.stroke();
330
331 // Draw line from center to target
332 ctx.beginPath();
333 ctx.moveTo(centerX, centerY);
334 ctx.lineTo(targetX, targetY);
335 ctx.strokeStyle = '#ff00ff';
336 ctx.lineWidth = 2;
337 ctx.stroke();
338 }
339
340 // Calculate aim adjustment
341 const dx = targetX - centerX;
342 const dy = targetY - centerY;
343
344 // Apply smoothing
345 const adjustX = dx * config.aimbotSmooth;
346 const adjustY = dy * config.aimbotSmooth;
347
348 // In a real implementation, this would move the mouse/camera
349 // For now, we'll just log it
350 console.log(`[Veck.io Aimbot] Aiming at ${closestPlayer.name}: dx=${adjustX.toFixed(2)}, dy=${adjustY.toFixed(2)}`);
351
352 // Auto shoot if enabled
353 if (config.autoShoot && closestDistance < 50) {
354 console.log('[Veck.io Aimbot] Auto shooting!');
355 // Trigger shoot action here
356 }
357 }
358 }
359
360 // Main loop
361 function mainLoop() {
362 drawESP();
363 aimbot();
364 requestAnimationFrame(mainLoop);
365 }
366
367 // Create settings menu
368 function createSettingsMenu() {
369 const menu = document.createElement('div');
370 menu.id = 'veckio-aimbot-menu';
371 menu.style.cssText = `
372 position: fixed;
373 top: 10px;
374 right: 10px;
375 background: rgba(0, 0, 0, 0.9);
376 color: white;
377 padding: 15px;
378 border-radius: 8px;
379 font-family: Arial, sans-serif;
380 font-size: 14px;
381 z-index: 10000;
382 min-width: 250px;
383 box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
384 `;
385
386 menu.innerHTML = `
387 <div style="margin-bottom: 10px; font-weight: bold; font-size: 16px; color: #00ff00;">
388 Veck.io Aimbot & ESP
389 </div>
390 <div style="margin-bottom: 8px;">
391 <label style="display: flex; align-items: center; cursor: pointer;">
392 <input type="checkbox" id="aimbot-toggle" ${config.aimbotEnabled ? 'checked' : ''} style="margin-right: 8px;">
393 <span>Aimbot (Hold ${config.aimKey.toUpperCase()})</span>
394 </label>
395 </div>
396 <div style="margin-bottom: 8px;">
397 <label style="display: flex; align-items: center; cursor: pointer;">
398 <input type="checkbox" id="esp-toggle" ${config.espEnabled ? 'checked' : ''} style="margin-right: 8px;">
399 <span>ESP</span>
400 </label>
401 </div>
402 <div style="margin-bottom: 8px;">
403 <label style="display: flex; align-items: center; cursor: pointer;">
404 <input type="checkbox" id="esp-boxes" ${config.espBoxes ? 'checked' : ''} style="margin-right: 8px;">
405 <span>ESP Boxes</span>
406 </label>
407 </div>
408 <div style="margin-bottom: 8px;">
409 <label style="display: flex; align-items: center; cursor: pointer;">
410 <input type="checkbox" id="esp-lines" ${config.espLines ? 'checked' : ''} style="margin-right: 8px;">
411 <span>ESP Lines</span>
412 </label>
413 </div>
414 <div style="margin-bottom: 8px;">
415 <label style="display: flex; align-items: center; cursor: pointer;">
416 <input type="checkbox" id="esp-health" ${config.espHealth ? 'checked' : ''} style="margin-right: 8px;">
417 <span>ESP Health</span>
418 </label>
419 </div>
420 <div style="margin-bottom: 8px;">
421 <label style="display: flex; align-items: center; cursor: pointer;">
422 <input type="checkbox" id="auto-shoot" ${config.autoShoot ? 'checked' : ''} style="margin-right: 8px;">
423 <span>Auto Shoot</span>
424 </label>
425 </div>
426 <div style="margin-bottom: 8px;">
427 <label style="display: flex; align-items: center; cursor: pointer;">
428 <input type="checkbox" id="fov-circle" ${config.showFOVCircle ? 'checked' : ''} style="margin-right: 8px;">
429 <span>Show FOV Circle</span>
430 </label>
431 </div>
432 <div style="margin-bottom: 8px;">
433 <label style="display: block; margin-bottom: 4px;">FOV: ${config.aimbotFOV}</label>
434 <input type="range" id="fov-slider" min="50" max="500" value="${config.aimbotFOV}" style="width: 100%;">
435 </div>
436 <div style="margin-bottom: 8px;">
437 <label style="display: block; margin-bottom: 4px;">Smoothing: ${config.aimbotSmooth.toFixed(2)}</label>
438 <input type="range" id="smooth-slider" min="0.1" max="1" step="0.1" value="${config.aimbotSmooth}" style="width: 100%;">
439 </div>
440 <div style="margin-top: 10px; font-size: 11px; color: #888;">
441 Press INSERT to toggle menu
442 </div>
443 `;
444
445 document.body.appendChild(menu);
446
447 // Add event listeners
448 document.getElementById('aimbot-toggle').addEventListener('change', async (e) => {
449 config.aimbotEnabled = e.target.checked;
450 await saveConfig();
451 console.log('[Veck.io Aimbot] Aimbot:', config.aimbotEnabled ? 'ON' : 'OFF');
452 });
453
454 document.getElementById('esp-toggle').addEventListener('change', async (e) => {
455 config.espEnabled = e.target.checked;
456 await saveConfig();
457 console.log('[Veck.io Aimbot] ESP:', config.espEnabled ? 'ON' : 'OFF');
458 });
459
460 document.getElementById('esp-boxes').addEventListener('change', async (e) => {
461 config.espBoxes = e.target.checked;
462 await saveConfig();
463 });
464
465 document.getElementById('esp-lines').addEventListener('change', async (e) => {
466 config.espLines = e.target.checked;
467 await saveConfig();
468 });
469
470 document.getElementById('esp-health').addEventListener('change', async (e) => {
471 config.espHealth = e.target.checked;
472 await saveConfig();
473 });
474
475 document.getElementById('auto-shoot').addEventListener('change', async (e) => {
476 config.autoShoot = e.target.checked;
477 await saveConfig();
478 console.log('[Veck.io Aimbot] Auto Shoot:', config.autoShoot ? 'ON' : 'OFF');
479 });
480
481 document.getElementById('fov-circle').addEventListener('change', async (e) => {
482 config.showFOVCircle = e.target.checked;
483 await saveConfig();
484 });
485
486 document.getElementById('fov-slider').addEventListener('input', async (e) => {
487 config.aimbotFOV = parseInt(e.target.value);
488 e.target.previousElementSibling.textContent = `FOV: ${config.aimbotFOV}`;
489 await saveConfig();
490 });
491
492 document.getElementById('smooth-slider').addEventListener('input', async (e) => {
493 config.aimbotSmooth = parseFloat(e.target.value);
494 e.target.previousElementSibling.textContent = `Smoothing: ${config.aimbotSmooth.toFixed(2)}`;
495 await saveConfig();
496 });
497
498 console.log('[Veck.io Aimbot] Settings menu created');
499 }
500
501 // Setup keyboard controls
502 function setupControls() {
503 document.addEventListener('keydown', (e) => {
504 // Toggle aim with configured key
505 if (e.key.toLowerCase() === config.aimKey.toLowerCase()) {
506 isAiming = true;
507 console.log('[Veck.io Aimbot] Aiming: ON');
508 }
509
510 // Toggle menu with INSERT key
511 if (e.key === 'Insert') {
512 const menu = document.getElementById('veckio-aimbot-menu');
513 if (menu) {
514 menu.style.display = menu.style.display === 'none' ? 'block' : 'none';
515 }
516 }
517 });
518
519 document.addEventListener('keyup', (e) => {
520 if (e.key.toLowerCase() === config.aimKey.toLowerCase()) {
521 isAiming = false;
522 console.log('[Veck.io Aimbot] Aiming: OFF');
523 }
524 });
525
526 console.log('[Veck.io Aimbot] Controls setup complete');
527 }
528
529 // Initialize
530 async function init() {
531 console.log('[Veck.io Aimbot] Initializing...');
532
533 // Load config
534 await loadConfig();
535
536 // Wait for game to load
537 const waitForGame = setInterval(() => {
538 if (findGameCanvas()) {
539 clearInterval(waitForGame);
540
541 // Create overlay
542 createOverlay();
543
544 // Create settings menu
545 createSettingsMenu();
546
547 // Setup controls
548 setupControls();
549
550 // Hook into game
551 hookGame();
552
553 // Start main loop
554 mainLoop();
555
556 console.log('[Veck.io Aimbot] Initialization complete!');
557 console.log('[Veck.io Aimbot] Hold', config.aimKey.toUpperCase(), 'to aim');
558 console.log('[Veck.io Aimbot] Press INSERT to toggle menu');
559 }
560 }, 1000);
561 }
562
563 // Start when page loads
564 if (document.readyState === 'loading') {
565 document.addEventListener('DOMContentLoaded', init);
566 } else {
567 init();
568 }
569
570})();