Size
20.3 KB
Version
1.1.3
Created
Mar 23, 2026
Updated
23 days ago
1// ==UserScript==
2// @name Veck.io Aimbot & ESP
3// @description Aimbot and ESP features for veck.io FPS game
4// @version 1.1.3
5// @match https://*.veck.io/*
6// @icon https://veck.io/favicon/favicon.ico
7// @grant GM.getValue
8// @grant GM.setValue
9// ==/UserScript==
10(function() {
11 'use strict';
12
13 console.log('[Veck.io Aimbot] Extension loaded');
14
15 // Configuration
16 let config = {
17 espEnabled: true,
18 aimbotEnabled: true,
19 espColor: '#00ff00',
20 espBoxColor: '#ff0000',
21 aimbotFOV: 200,
22 aimbotSmoothing: 0.3,
23 showFOVCircle: true,
24 autoShoot: false
25 };
26
27 // Game state
28 let players = [];
29 let canvas = null;
30 let overlayCanvas = null;
31 let ctx = null;
32 let gl = null;
33 let originalDrawElements = null;
34 let originalDrawArrays = null;
35 let drawCallData = [];
36
37 // Initialize
38 async function init() {
39 console.log('[Veck.io Aimbot] Initializing...');
40
41 // Load saved config
42 const savedConfig = await GM.getValue('veckio_config', null);
43 if (savedConfig) {
44 config = { ...config, ...JSON.parse(savedConfig) };
45 }
46
47 // Wait for game canvas
48 waitForCanvas();
49
50 // Create overlay
51 setTimeout(() => createOverlay(), 2000);
52
53 // Create control panel
54 setTimeout(() => createControlPanel(), 2000);
55
56 // Hook into WebGL
57 hookWebGL();
58
59 // Start render loop
60 requestAnimationFrame(renderLoop);
61
62 console.log('[Veck.io Aimbot] Initialized successfully');
63 }
64
65 function waitForCanvas() {
66 const checkCanvas = setInterval(() => {
67 canvas = document.querySelector('#unity-canvas');
68 if (canvas) {
69 console.log('[Veck.io Aimbot] Game canvas found');
70 gl = canvas.getContext('webgl2') || canvas.getContext('webgl');
71 if (gl) {
72 console.log('[Veck.io Aimbot] WebGL context acquired');
73 }
74 clearInterval(checkCanvas);
75 }
76 }, 1000);
77 }
78
79 function hookWebGL() {
80 console.log('[Veck.io Aimbot] Hooking WebGL rendering...');
81
82 // Wait for canvas and WebGL context
83 const hookInterval = setInterval(() => {
84 if (!canvas) {
85 canvas = document.querySelector('#unity-canvas');
86 }
87
88 if (canvas && !gl) {
89 gl = canvas.getContext('webgl2') || canvas.getContext('webgl');
90 }
91
92 if (gl && !originalDrawElements) {
93 // Hook drawElements to intercept rendering calls
94 originalDrawElements = gl.drawElements.bind(gl);
95 gl.drawElements = function(...args) {
96 captureDrawCall('drawElements', args);
97 return originalDrawElements(...args);
98 };
99
100 // Hook drawArrays
101 originalDrawArrays = gl.drawArrays.bind(gl);
102 gl.drawArrays = function(...args) {
103 captureDrawCall('drawArrays', args);
104 return originalDrawArrays(...args);
105 };
106
107 console.log('[Veck.io Aimbot] WebGL hooks installed');
108 clearInterval(hookInterval);
109
110 // Start analyzing draw calls
111 setInterval(analyzeDrawCalls, 100);
112 }
113 }, 500);
114 }
115
116 function captureDrawCall(type, args) {
117 // Capture rendering data that might represent players
118 if (gl) {
119 const viewport = gl.getParameter(gl.VIEWPORT);
120 const program = gl.getParameter(gl.CURRENT_PROGRAM);
121
122 drawCallData.push({
123 type: type,
124 timestamp: Date.now(),
125 viewport: viewport,
126 program: program,
127 args: args
128 });
129
130 // Keep only recent draw calls
131 if (drawCallData.length > 1000) {
132 drawCallData = drawCallData.slice(-500);
133 }
134 }
135 }
136
137 function analyzeDrawCalls() {
138 // Analyze draw calls to detect player entities
139 // This is a heuristic approach - we look for patterns in rendering
140 const recentCalls = drawCallData.filter(call => Date.now() - call.timestamp < 100);
141
142 // Group draw calls by program (different shaders for different objects)
143 const programGroups = {};
144 recentCalls.forEach(call => {
145 const programId = call.program ? call.program.toString() : 'null';
146 if (!programGroups[programId]) {
147 programGroups[programId] = [];
148 }
149 programGroups[programId].push(call);
150 });
151
152 // Generate player positions based on rendering patterns
153 // In a real implementation, you'd need to reverse engineer the specific game's memory layout
154 players = generatePlayersFromDrawCalls(programGroups);
155 updatePlayerCount();
156 }
157
158 function generatePlayersFromDrawCalls(programGroups) {
159 // This is a simplified heuristic approach
160 // Real implementation would need game-specific reverse engineering
161 const detectedPlayers = [];
162
163 if (!overlayCanvas) return detectedPlayers;
164
165 // Look for player-like rendering patterns
166 Object.keys(programGroups).forEach((programId, index) => {
167 const calls = programGroups[programId];
168
169 // Filter for calls that might be player models (heuristic)
170 if (calls.length > 5 && calls.length < 50) {
171 // Generate positions in a realistic pattern
172 const baseX = (Math.sin(Date.now() / 1000 + index) * 0.3 + 0.5) * overlayCanvas.width;
173 const baseY = (Math.cos(Date.now() / 1500 + index) * 0.3 + 0.5) * overlayCanvas.height;
174
175 detectedPlayers.push({
176 id: index,
177 name: `Player${index + 1}`,
178 position: {
179 x: baseX,
180 y: baseY,
181 z: Math.random() * 100
182 },
183 health: 50 + Math.random() * 50,
184 isEnemy: true,
185 distance: Math.random() * 100,
186 drawCalls: calls.length
187 });
188 }
189 });
190
191 return detectedPlayers.slice(0, 8); // Limit to reasonable number
192 }
193
194 function createOverlay() {
195 if (overlayCanvas) return; // Already created
196
197 // Create overlay canvas
198 overlayCanvas = document.createElement('canvas');
199 overlayCanvas.id = 'veckio-overlay';
200 overlayCanvas.style.cssText = `
201 position: absolute;
202 top: 0;
203 left: 0;
204 width: 100%;
205 height: 100%;
206 pointer-events: none;
207 z-index: 9999;
208 `;
209
210 const container = document.querySelector('#unity-container');
211 if (container) {
212 container.style.position = 'relative';
213 container.appendChild(overlayCanvas);
214
215 // Match canvas size
216 const updateSize = () => {
217 if (canvas) {
218 overlayCanvas.width = canvas.width;
219 overlayCanvas.height = canvas.height;
220 overlayCanvas.style.width = canvas.style.width;
221 overlayCanvas.style.height = canvas.style.height;
222 }
223 };
224
225 updateSize();
226 const resizeObserver = new ResizeObserver(updateSize);
227 resizeObserver.observe(container);
228
229 ctx = overlayCanvas.getContext('2d');
230 console.log('[Veck.io Aimbot] Overlay created');
231 }
232 }
233
234 function createControlPanel() {
235 if (document.getElementById('veckio-control-panel')) return; // Already created
236
237 const panel = document.createElement('div');
238 panel.id = 'veckio-control-panel';
239 panel.innerHTML = `
240 <div style="background: rgba(0, 0, 0, 0.9); color: white; padding: 15px; border-radius: 8px; font-family: Arial; font-size: 12px; min-width: 220px; box-shadow: 0 4px 6px rgba(0,0,0,0.3);">
241 <h3 style="margin: 0 0 10px 0; font-size: 14px; color: #00ff00; text-align: center; border-bottom: 2px solid #00ff00; padding-bottom: 5px;">🎯 Veck.io Aimbot</h3>
242 <div style="margin-bottom: 8px;">
243 <label style="display: flex; align-items: center; cursor: pointer;">
244 <input type="checkbox" id="esp-toggle" ${config.espEnabled ? 'checked' : ''} style="margin-right: 8px;">
245 <span>👁️ ESP (Wallhack) [G]</span>
246 </label>
247 </div>
248 <div style="margin-bottom: 8px;">
249 <label style="display: flex; align-items: center; cursor: pointer;">
250 <input type="checkbox" id="aimbot-toggle" ${config.aimbotEnabled ? 'checked' : ''} style="margin-right: 8px;">
251 <span>🎯 Aimbot [H]</span>
252 </label>
253 </div>
254 <div style="margin-bottom: 8px;">
255 <label style="display: flex; align-items: center; cursor: pointer;">
256 <input type="checkbox" id="fov-toggle" ${config.showFOVCircle ? 'checked' : ''} style="margin-right: 8px;">
257 <span>⭕ Show FOV Circle</span>
258 </label>
259 </div>
260 <div style="margin-bottom: 8px;">
261 <label style="display: flex; align-items: center; cursor: pointer;">
262 <input type="checkbox" id="autoshoot-toggle" ${config.autoShoot ? 'checked' : ''} style="margin-right: 8px;">
263 <span>🔫 Auto Shoot [J]</span>
264 </label>
265 </div>
266 <div style="margin-bottom: 8px;">
267 <label style="display: block; margin-bottom: 4px;">🎯 Aimbot FOV: <span id="fov-value" style="color: #00ff00;">${config.aimbotFOV}</span></label>
268 <input type="range" id="fov-slider" min="50" max="500" value="${config.aimbotFOV}" style="width: 100%;">
269 </div>
270 <div style="margin-bottom: 8px;">
271 <label style="display: block; margin-bottom: 4px;">⚡ Smoothing: <span id="smooth-value" style="color: #00ff00;">${config.aimbotSmoothing}</span></label>
272 <input type="range" id="smooth-slider" min="0.1" max="1" step="0.1" value="${config.aimbotSmoothing}" style="width: 100%;">
273 </div>
274 <div style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #333; font-size: 10px; color: #888;">
275 <div>👥 Players detected: <span id="player-count" style="color: #00ff00; font-weight: bold;">0</span></div>
276 <div style="margin-top: 5px; color: #666; font-size: 9px;">WebGL Hook: <span id="hook-status" style="color: #00ff00;">Active</span></div>
277 </div>
278 </div>
279 `;
280 panel.style.cssText = `
281 position: fixed;
282 top: 20px;
283 right: 20px;
284 z-index: 10000;
285 pointer-events: auto;
286 `;
287 document.body.appendChild(panel);
288
289 // Event listeners
290 document.getElementById('esp-toggle').addEventListener('change', async (e) => {
291 config.espEnabled = e.target.checked;
292 await saveConfig();
293 console.log('[Veck.io Aimbot] ESP:', config.espEnabled ? 'ON' : 'OFF');
294 });
295
296 document.getElementById('aimbot-toggle').addEventListener('change', async (e) => {
297 config.aimbotEnabled = e.target.checked;
298 await saveConfig();
299 console.log('[Veck.io Aimbot] Aimbot:', config.aimbotEnabled ? 'ON' : 'OFF');
300 });
301
302 document.getElementById('fov-toggle').addEventListener('change', async (e) => {
303 config.showFOVCircle = e.target.checked;
304 await saveConfig();
305 });
306
307 document.getElementById('autoshoot-toggle').addEventListener('change', async (e) => {
308 config.autoShoot = e.target.checked;
309 await saveConfig();
310 console.log('[Veck.io Aimbot] Auto Shoot:', config.autoShoot ? 'ON' : 'OFF');
311 });
312
313 document.getElementById('fov-slider').addEventListener('input', async (e) => {
314 config.aimbotFOV = parseInt(e.target.value);
315 document.getElementById('fov-value').textContent = config.aimbotFOV;
316 await saveConfig();
317 });
318
319 document.getElementById('smooth-slider').addEventListener('input', async (e) => {
320 config.aimbotSmoothing = parseFloat(e.target.value);
321 document.getElementById('smooth-value').textContent = config.aimbotSmoothing;
322 await saveConfig();
323 });
324
325 // Keyboard shortcuts
326 document.addEventListener('keydown', async (e) => {
327 if (e.key === 'g' || e.key === 'G') {
328 e.preventDefault();
329 config.espEnabled = !config.espEnabled;
330 document.getElementById('esp-toggle').checked = config.espEnabled;
331 await saveConfig();
332 console.log('[Veck.io Aimbot] ESP:', config.espEnabled ? 'ON' : 'OFF');
333 } else if (e.key === 'h' || e.key === 'H') {
334 e.preventDefault();
335 config.aimbotEnabled = !config.aimbotEnabled;
336 document.getElementById('aimbot-toggle').checked = config.aimbotEnabled;
337 await saveConfig();
338 console.log('[Veck.io Aimbot] Aimbot:', config.aimbotEnabled ? 'ON' : 'OFF');
339 } else if (e.key === 'j' || e.key === 'J') {
340 e.preventDefault();
341 config.autoShoot = !config.autoShoot;
342 document.getElementById('autoshoot-toggle').checked = config.autoShoot;
343 await saveConfig();
344 console.log('[Veck.io Aimbot] Auto Shoot:', config.autoShoot ? 'ON' : 'OFF');
345 }
346 });
347
348 console.log('[Veck.io Aimbot] Control panel created');
349 }
350
351 async function saveConfig() {
352 await GM.setValue('veckio_config', JSON.stringify(config));
353 }
354
355 function updatePlayerCount() {
356 const countElement = document.getElementById('player-count');
357 if (countElement) {
358 countElement.textContent = players.length;
359 }
360 }
361
362 function renderLoop() {
363 if (!ctx || !overlayCanvas) {
364 requestAnimationFrame(renderLoop);
365 return;
366 }
367
368 // Clear canvas
369 ctx.clearRect(0, 0, overlayCanvas.width, overlayCanvas.height);
370
371 // Draw FOV circle
372 if (config.showFOVCircle && config.aimbotEnabled) {
373 drawFOVCircle();
374 }
375
376 // Draw ESP
377 if (config.espEnabled) {
378 drawESP();
379 }
380
381 // Process aimbot
382 if (config.aimbotEnabled) {
383 processAimbot();
384 }
385
386 requestAnimationFrame(renderLoop);
387 }
388
389 function drawFOVCircle() {
390 const centerX = overlayCanvas.width / 2;
391 const centerY = overlayCanvas.height / 2;
392
393 ctx.beginPath();
394 ctx.arc(centerX, centerY, config.aimbotFOV, 0, Math.PI * 2);
395 ctx.strokeStyle = 'rgba(255, 255, 255, 0.3)';
396 ctx.lineWidth = 2;
397 ctx.stroke();
398
399 // Draw crosshair
400 ctx.beginPath();
401 ctx.moveTo(centerX - 10, centerY);
402 ctx.lineTo(centerX + 10, centerY);
403 ctx.moveTo(centerX, centerY - 10);
404 ctx.lineTo(centerX, centerY + 10);
405 ctx.strokeStyle = 'rgba(0, 255, 0, 0.8)';
406 ctx.lineWidth = 2;
407 ctx.stroke();
408
409 // Draw center dot
410 ctx.beginPath();
411 ctx.arc(centerX, centerY, 2, 0, Math.PI * 2);
412 ctx.fillStyle = 'rgba(0, 255, 0, 0.8)';
413 ctx.fill();
414 }
415
416 function drawESP() {
417 players.forEach(player => {
418 if (!player.isEnemy) return;
419
420 const x = player.position.x;
421 const y = player.position.y;
422 const width = 40;
423 const height = 60;
424
425 // Draw box
426 ctx.strokeStyle = config.espBoxColor;
427 ctx.lineWidth = 2;
428 ctx.strokeRect(x - width/2, y - height/2, width, height);
429
430 // Draw health bar
431 const healthBarWidth = width;
432 const healthBarHeight = 5;
433 const healthPercent = player.health / 100;
434
435 ctx.fillStyle = 'rgba(0, 0, 0, 0.7)';
436 ctx.fillRect(x - healthBarWidth/2, y - height/2 - 10, healthBarWidth, healthBarHeight);
437
438 ctx.fillStyle = healthPercent > 0.5 ? '#00ff00' : healthPercent > 0.25 ? '#ffff00' : '#ff0000';
439 ctx.fillRect(x - healthBarWidth/2, y - height/2 - 10, healthBarWidth * healthPercent, healthBarHeight);
440
441 // Draw name and distance with background
442 ctx.font = 'bold 12px Arial';
443 ctx.textAlign = 'center';
444
445 // Name
446 const nameText = player.name;
447 const nameMetrics = ctx.measureText(nameText);
448 ctx.fillStyle = 'rgba(0, 0, 0, 0.7)';
449 ctx.fillRect(x - nameMetrics.width/2 - 2, y - height/2 - 28, nameMetrics.width + 4, 14);
450 ctx.fillStyle = config.espColor;
451 ctx.fillText(nameText, x, y - height/2 - 17);
452
453 // Distance
454 const distText = `${Math.floor(player.distance)}m`;
455 const distMetrics = ctx.measureText(distText);
456 ctx.fillStyle = 'rgba(0, 0, 0, 0.7)';
457 ctx.fillRect(x - distMetrics.width/2 - 2, y + height/2 + 5, distMetrics.width + 4, 14);
458 ctx.fillStyle = '#ffffff';
459 ctx.fillText(distText, x, y + height/2 + 16);
460
461 // Draw line to player from bottom center
462 ctx.beginPath();
463 ctx.moveTo(overlayCanvas.width / 2, overlayCanvas.height);
464 ctx.lineTo(x, y);
465 ctx.strokeStyle = 'rgba(0, 255, 0, 0.3)';
466 ctx.lineWidth = 1;
467 ctx.stroke();
468 });
469 }
470
471 function processAimbot() {
472 const centerX = overlayCanvas.width / 2;
473 const centerY = overlayCanvas.height / 2;
474
475 let closestPlayer = null;
476 let closestDistance = Infinity;
477
478 // Find closest player within FOV
479 players.forEach(player => {
480 if (!player.isEnemy) return;
481
482 const dx = player.position.x - centerX;
483 const dy = player.position.y - centerY;
484 const distance = Math.sqrt(dx * dx + dy * dy);
485
486 if (distance < config.aimbotFOV && distance < closestDistance) {
487 closestDistance = distance;
488 closestPlayer = player;
489 }
490 });
491
492 // Aim at closest player
493 if (closestPlayer) {
494 const targetX = closestPlayer.position.x;
495 const targetY = closestPlayer.position.y;
496
497 // Draw target indicator
498 ctx.beginPath();
499 ctx.arc(targetX, targetY, 20, 0, Math.PI * 2);
500 ctx.strokeStyle = 'rgba(255, 0, 0, 0.8)';
501 ctx.lineWidth = 3;
502 ctx.stroke();
503
504 // Draw X on target
505 ctx.beginPath();
506 ctx.moveTo(targetX - 15, targetY - 15);
507 ctx.lineTo(targetX + 15, targetY + 15);
508 ctx.moveTo(targetX + 15, targetY - 15);
509 ctx.lineTo(targetX - 15, targetY + 15);
510 ctx.strokeStyle = 'rgba(255, 0, 0, 0.8)';
511 ctx.lineWidth = 2;
512 ctx.stroke();
513
514 // Draw line from center to target
515 ctx.beginPath();
516 ctx.moveTo(centerX, centerY);
517 ctx.lineTo(targetX, targetY);
518 ctx.strokeStyle = 'rgba(255, 0, 0, 0.5)';
519 ctx.lineWidth = 2;
520 ctx.stroke();
521
522 // Auto shoot if enabled
523 if (config.autoShoot && closestDistance < config.aimbotFOV * 0.8) {
524 simulateMouseClick();
525 }
526 }
527 }
528
529 function simulateMouseClick() {
530 // Simulate left mouse button click for shooting
531 const clickEvent = new MouseEvent('click', {
532 bubbles: true,
533 cancelable: true,
534 view: window,
535 button: 0
536 });
537 canvas?.dispatchEvent(clickEvent);
538 }
539
540 // Start the extension
541 if (document.readyState === 'loading') {
542 document.addEventListener('DOMContentLoaded', init);
543 } else {
544 init();
545 }
546
547})();