Veck.io Unified Helper

Aimbot and targeting logic for Veck.io. Press 'V' to toggle.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Veck.io Unified Helper
// @namespace    http://tampermonkey.net
// @version      1.0
// @description  Aimbot and targeting logic for Veck.io. Press 'V' to toggle.
// @author       You
// @match        *://veck.io/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    let gameData = null;
    let autoAimEnabled = true;

    // Toggle with 'V' key
    window.addEventListener('keydown', (e) => {
        if (e.code === 'KeyV') {
            autoAimEnabled = !autoAimEnabled;
            console.log('Aimbot: ' + (autoAimEnabled ? 'ON' : 'OFF'));
        }
    });

    const findGameEngine = () => {
        // Veck.io often stores data in window.game or window.app
        if (window.game && window.game.players) {
            gameData = window.game;
        }
    };

    const getNearestPlayer = () => {
        if (!gameData || !gameData.players || !gameData.localPlayer) return null;

        const myPos = gameData.localPlayer.position;
        let nearest = null;
        let minDist = Infinity;

        for (let id in gameData.players) {
            let p = gameData.players[id];
            
            // Skip self, teammates (if team mode), or dead players
            if (p.id === gameData.localPlayer.id || p.health <= 0) continue;

            let dist = Math.sqrt(
                Math.pow(p.position.x - myPos.x, 2) + 
                Math.pow(p.position.z - myPos.z, 2)
            );

            if (dist < minDist) {
                minDist = dist;
                nearest = p;
            }
        }
        return nearest;
    };

    const autoAim = () => {
        if (!autoAimEnabled) return;

        const target = getNearestPlayer();
        if (target) {
            // Calculation for 3D rotation (Yaw)
            gameData.localPlayer.yaw = Math.atan2(
                target.position.z - gameData.localPlayer.position.z,
                target.position.x - gameData.localPlayer.position.x
            );
        }
    };

    // Main Loop
    setInterval(() => {
        if (!gameData) {
            findGameEngine();
        } else {
            autoAim();
        }
    }, 50); // 20 times per second for smoother tracking

})();