Narrow one Aimbot & ESP & Fly & No clip MODMENU

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

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         Narrow one Aimbot & ESP & Fly & No clip MODMENU
// @namespace    http://tampermonkey.net/
// @version      3.0
// @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==


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

document.addEventListener("keyup", (e) => {
    if (e.key === "f") {
        document.querySelectorAll("[type='checkbox']")[0].checked^=1
        state.aimbotEnabled ^= 1;
    }
    if (e.key === "e") {
        document.querySelectorAll("[type='checkbox']")[1].checked^=1
        state.espEnabled ^= 1;
    }
});

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

    state.myPlayer = state.game.getMyPlayer();
    state.rigidBody = [...state.myPlayer?.physicsManager.rigidBodies].filter((e) => {
        return e.player?.id == state.myPlayer.id
    })[0]

    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;
    1
    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);
};


var c = document.createElement('div')
c.innerHTML = `
<div id="wrap">
    <div id="header">
        <h2>double click to hide</h2>
        <p>by gabi</p>
    </div>
    <div id="options">

        <div class="option">
            <span>aimbot (toggle f)</span>
            <input type="checkbox">
        </div>
        <div class="option">
            <span>esp (toggle e)</span>
            <input type="checkbox" checked>
        </div>
        <div class="option">
            <span>fly</span>
            <input type="checkbox">
        </div>
        <div class="option">
            <span>noclip</span>
            <input type="checkbox">
        </div>


        <div class="option">
            <span>walk speed <br>(60)</span>
            <input type="range" min="0" max="200" value="60">
        </div>

        <div class="option">
            <span>jump height <br>(8.6)</span>
            <input type="range" step="0.2" min="0" max="30" value="8.6">
        </div>

    </div>
</div>

<style>
@font-face {
    font-family: BlueNight;
    src: url(BlueNight.woff2);
}

body {
    margin: 0;
    background: gray;
}
.hidden {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
}
.hidden #options {display: none;}
.hidden h2 {display: none;}
.hidden p {display: none;}

#wrap {
    font-family: BlueNight, sans-serif;
    position: absolute;
    width: 250px;
    height: 300px;
    top: 30%;
    left: 70%;
    background: white;
    border: 3px solid black;
    display: flex;
    flex-direction: column;
}


#header {
    height: 12%;
    border-bottom: 3px solid black;
    padding: 5px;
    cursor: grab;
}

#header h2 {margin: 0;font-size: 20px;}
#header p {margin: 0;font-size: 14px;}
#options {flex: 1;overflow-y: auto;}

.option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 2px solid black;
    min-height: 38px;
}

.option:last-child {border-bottom: none;}
.option span {font-size: 20px;}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
}
input[type="range"] {width: 100px;}
#options::-webkit-scrollbar {width: 5px;}
#options::-webkit-scrollbar-track {background: #ddd;}
#options::-webkit-scrollbar-thumb {background: black;}
</style>
`
document.body.appendChild(c)

var options = document.querySelectorAll(".option")
var wrap = document.querySelector("#wrap")
var os = wrap.style

wrap.ondblclick =_=> wrap.classList.toggle("hidden");
wrap.children[0].onmousedown=_=>state.dragging=1
document.onmouseup=_=>state.dragging=0
document.onmousemove=e=>{
    if(!state.dragging) return
    wrap.style.left = (e.clientX-30)+"px"
    wrap.style.top = (e.clientY+100)+"px"
}

function mode(i,v){
    switch (i){
        case (0): state.aimbotEnabled = v;break
        case (1): state.espEnabled = v;break
        case (2): state.rigidBody.fly = v;break
        case (3): state.rigidBody.noclip = v;break
        case (4): state.myPlayer.walkSpeed = v;break
        case (5): state.myPlayer.jumpForce = v;break
    }
}
options.forEach((e,i)=>{
    e.addEventListener("click",()=>{
        const input = e.children[1]
        const value = input.type === "range"
        ? Number(input.value)
        : input.checked

        mode(i,value)
    })
})