Karnage NoAim

An aimbot for Varnage.io (Use at your own discretion)

14.03.2017 itibariyledir. En son verisyonu görün.

Bu script direkt olarak kurulamaz. Başka scriptler için bir kütüphanedir ve meta yönergeleri içerir // @require https://update.sleazyfork.org/scripts/28129/180840/Karnage%20NoAim.js

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Karnage NoAim
// @namespace    Karnage
// @version      1.0
// @description  An aimbot for Varnage.io (Use at your own discretion)
// @author       dannytech
// @match        http://vertix.io/*
// @grant        none
// ==/UserScript==

// You are 100% responsible if you get caught using this script, so don't try to go after me.

(function() {
    'use strict';

    // Common variables
    var targetId;
    var mouse;
    var isOn = !window.localStorage.getItem("aimbot");
    console.log("NoAim is", isOn ? "on" : "off");

    // Add our listener
    window.addEventListener("mousemove", function(values) {
        mouse = {
            x: values.clientX,
            y: values.clientY
        };
        // console.log((mouse.x / window.innerWidth) * 2 - 1, (mouse.y / window.innerHeight) * 2 - 1); // 0 is center
    });

    // Patch the listener so nothing else can be added
    const addListener = window.addEventListener;
    var mouseMove;
    window.addEventListener = function(type, listener) {
        if(type !== "mousemove") addListener(type, listener);
        else mouseMove = listener;
    };

    // Add toggles for features
    window.addEventListener("keypress", function(keypress) {
        // If the toggle key was pressed
        if(keypress.which === 66) { // B
        window.localStorage.setItem("aimbot", !window.localStorage.getItem("aimbot"));
            if(!window.localStorage.getItem("aimbot")) { // It is now enabled
                window.removeEventListener("mousemove", mouseMove);
                console.log("NoAim on");
            } else { // It is now disabled
                addListener("mousemove", mouseMove);
                console.log("NoAim off");
            }
        }
    });

    setInterval(function() {
        // Aimbot disabled
        if(!isOn) return;

        // If the game is loaded and the user is in a lobby
        if(player && players.length > 0) {
            // Find the mouse position in game values
            var mousex = ((player.viewDist / window.innerWidth) * mouse.x) + player.x;
            var mousez = ((player.viewDist / window.innerHeight) * mouse.y) + player.z;

            // Find the positions of every other player, and how far away they are
            var otherPlayers = [];
            players.forEach(function(curPlayer) {
                // If the player isn't us, isn't on our team, and is alive, add them
                if(curPlayer.sid !== player.sid && curPlayer.alive && (curPlayer.team === null || curPlayer.team != player.team)) {
                    otherPlayers.push({
                        // dist: Math.sqrt(Math.pow(Math.abs(mousex - curPlayer.x), 2) + (Math.abs(mousez - curPlayer.z), 2)), // We calculate the distance away they are (the hypotenuse) using the pythagorean theorem
                        dist: Math.abs(player.x - curPlayer.x) + Math.abs(player.z - curPlayer.z),
                        x: curPlayer.x,
                        z: curPlayer.z,
                        name: curPlayer.name,
                        sid: curPlayer.sid
                    });
                }
            });

            // Find out which player is closest
            otherPlayers.sort(function(player1, player2) {
                if(player1.dist < player2.dist) return -1;
                else if(player1.dist > player2.dist) return 1;
                else if(player1.dist == player2.dist) return 0;
            });
            var targetPlayer = otherPlayers[0];
            if(targetPlayer) {
                // Set the current target
                if(targetId != targetPlayer.sid) {
                    console.log("Targeting", targetPlayer.name);
                    targetId = targetPlayer.sid;
                }

                // Aim
                MOUSE_X = (targetPlayer.x - player.x) / player.viewDist;
                MOUSE_Y = (targetPlayer.z - player.z) / player.viewDist;
            }
        }
    }, 5);
})();