Narrow one Aimbot & ESP

(F) To toggle Aimbot (E) to toggle ESP

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Narrow one Aimbot & ESP
// @namespace    http://tampermonkey.net/
// @version      2.2
// @description  (F) To toggle Aimbot (E) to toggle ESP
// @author       Dominus Gabi
// @match        https://narrow.one/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=narrow.one
// @grant        none
// @require      https://unpkg.com/[email protected]/build/three.min.js
// @license      MIT
// ==/UserScript==

// ==UserScript==
// @name         Narrow one Aimbot & ESP
// @namespace    http://tampermonkey.net/
// @version      2.1
// @description  (F) To toggle Aimbot (E) to toggle ESP
// @author       Dominus Gabi
// @match        https://narrow.one/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=narrow.one
// @grant        none
// @require      https://unpkg.com/[email protected]/build/three.min.js
// @license      MIT
// ==/UserScript==


const state = {
    ready: false,
    game: null,
    scene: null,
    myPlayer: null,
    playerList: [],
    enemyList: [],
    closestEnemy: { index: -1, distance: Infinity },
    aimbotEnabled: false,
    espEnabled: true
};

document.addEventListener("keyup", (e) => {
    if (e.key === "f") state.aimbotEnabled ^= 1;
    if (e.key === "e") state.espEnabled ^= 1;
});

function updateGame() {
    if (!state.game?.gameStarted) return;

    state.myPlayer = state.game.getMyPlayer();

    if (!state.myPlayer) {
        state.ready = false;
        state.playerList = [];
        state.enemyList = [];
        state.closestEnemy.index = -1;
        state.closestEnemy.distance = Infinity;
        return;
    }

    state.ready = true;

    state.playerList = [...state.game.players.values()]
        .filter(e => e && e.id !== state.myPlayer.id);
    state.enemyList = state.playerList.filter(
        e => e.teamId !== state.myPlayer.teamId
    );

    findClosestEnemy();
    aimbot();
    esp();
}

function findClosestEnemy() {
    state.closestEnemy.index = -1;
    state.closestEnemy.distance = Infinity;

    var myPos = state.myPlayer?.obj?.position;
    if (!myPos) return;

    state.enemyList.forEach((e, i) => {
        var pos = e?.obj?.position;
        if (!pos) return;

        var distance = myPos.distanceTo(pos);

        if (distance < state.closestEnemy.distance) {
            state.closestEnemy.index = i;
            state.closestEnemy.distance = distance;
        }
    });
}

function aimbot() {
    if (!state.aimbotEnabled || !state.ready) return;

    var enemy = state.enemyList[state.closestEnemy.index];
    if (!enemy?.pos) return;

    var dx = enemy.pos.x - state.myPlayer.pos.x;
    var dy = enemy.pos.y - state.myPlayer.pos.y;
    var dz = enemy.pos.z - state.myPlayer.pos.z;

    state.myPlayer.lookRot.x = Math.atan2(-dx, -dz);
    state.myPlayer.lookRot.y = Math.atan2(
        dy,
        Math.sqrt(dx * dx + dz * dz)
    );
}

function esp() {
    state.playerList.forEach(player => {
        var obj = player?.obj;
        if (!obj) return;

        if (!state.espEnabled) {
            if (obj.espBox) obj.espBox.visible = false;
            return;
        }

        if (obj.espBox) {
            obj.espBox.visible = true;
            return;
        }

        var bbox = new THREE.Box3().setFromObject(obj);
        var size = new THREE.Vector3();
        var center = new THREE.Vector3();

        bbox.getSize(size);
        bbox.getCenter(center);

        var geometry = new THREE.EdgesGeometry(
            new THREE.BoxGeometry(size.x, size.y, size.z)
        );

        var material = new THREE.LineBasicMaterial({
            color: player.teamId === state.myPlayer.teamId
                ? 0x00ff00
                : 0xff0000,
            depthTest: false
        });

        var box = new THREE.LineSegments(geometry, material);

        box.position.copy(obj.worldToLocal(center.clone()));
        box.position.y += 1;
        box.frustumCulling = false;
        box.renderOrder = 9999;

        obj.add(box);
        obj.espBox = box;
    });
}

var originalPush = Array.prototype.push;

Array.prototype.push = function (...args) {
    var game = args[0]?.playerCollider?.rigidBody?.player?.game;
    if (game) {
        state.game = game;
        state.scene = game.scene?.parent;
        updateGame();
    }
    return originalPush.apply(this, args);
};