NYX CS2 - external ESP + aimbot menu
=====================================
v2.5 | offsets: build 14188, baked 2026-10-03 (auto-refresh at launch)
C# / .NET 8, no injection, nothing written except the aimbot's view angles

!! WARNING - READ FIRST !!
- This is a game cheat. It violates Valve's CS2 Terms of Service.
- VAC (Valve Anti-Cheat) can and does ban accounts detected with cheats.
- Use ONLY on a private/secondary account, in OFFLINE / bot / private
  lobbies. Using it in official matchmaking risks a permanent account ban.
- You own all risk. This is provided as a private learning project.

WHAT IT DOES
    PLAYER ESP
        2D boxes in four styles (full / corner / filled / 3D), health bar,
        armour bar, skeleton, head box, snaplines from four anchor points,
        tracers, weapon name or weapon-class icon, distance, name.
        Each element has its own Enemies / Team / All filter, so you can
        have teammate boxes on and teammate names off.
        Visibility split: a player you can see and a player you cannot are
        drawn in different colours, from the engine's own spot mask.
        Distance fade (opaque band then ramping to 25%) and an optional hard
        cull, with separate ranges for ESP and for the aimbot.
        Corner-box + armour bar, offscreen arrows for people outside your
        view, footstep ripples on anyone running fast enough to hear.
    WORLD ESP
        Dropped weapons by name, every throwable by type (smoke / flash /
        HE / molotov / decoy), projectile paths extrapolated from live
        velocity, planted-C4 marker with location + countdown, blast-damage
        estimate, spectator list.
    PLAYER LIST
        Top-right panel with a live alive/total tally per team, HP bar,
        distance, ping with a colour gradient, dead players sunk to the
        bottom, and columns that reflow when you widen it.
    AIMBOT
        Steers the in-game camera toward a target by writing dwViewAngles -
        the same field the game writes every frame - so no cursor moves and
        it is unaffected by raw mouse input.
        Target ranking is an ORDERED list of three metrics (crosshair
        distance, world distance, health) compared lexicographically, so you
        can say "closest to the crosshair; break a tie on distance".
        Aim point is a named joint (head / neck / upper chest / chest /
        pelvis), or "nearest joint to the crosshair", or a random joint held
        ~1.2s per target.
        Four smoothing curves, a per-tick hit chance, an optional
        visible-only gate, and a switch hysteresis so it will not oscillate
        between two candidates.
    RECOIL
        Per-axis recoil control (pitch / yaw separately), and an option to
        compensate view punch during aimbot pulls even without the RCS key.
    TRIGGERBOT
        Continuous or burst fire, a real randomised delay window, hold
        jitter, per-hitgroup mask, a stillness-based "hitchance", scoped-only,
        and vetoes for flash-blinded, smoke-screened and friendly targets.
    OTHER
        Radar with independent teammate/enemy toggles and a movable position,
        anti-flash, bunny hop, auto-strafe, FOV / viewmodel changer,
        stream-proof mode, velocity graph, damage log, hit marker.
    PANIC KEY
        One key hides BOTH windows and saves your config first. Press it
        again to bring them back - it is a toggle, so recovering needs no
        other key. Rebindable on the CONFIG page.

FILES
    NyxCS2.exe               the menu + overlay (this is what you run)
    NyxCS2.runtimeconfig.json / NyxCS2.deps.json   (must sit next to the exe)
    nyx-config.json          your settings
    nyx.log                  diagnostics (attach state, paint timing, faults)
    offsets-live.json        cached upstream offset fetch
    README.txt               this file
    CS2External\             full source + project

HOW TO RUN
    1. Start CS2, join a map (main menu is fine too), use FULLSCREEN
       WINDOWED / BORDERLESS - the overlay cannot draw over exclusive
       fullscreen.
    2. Run NyxCS2.exe.
    3. If it says "OpenProcess denied" -> right-click the exe, Run as
       administrator, and rerun.
    4. The overlay appears over the game with a live status line top-left.

CONTROLS
    INSERT  show / hide the MENU
    END     show / hide the OVERLAY
    F8      stream-proof toggle (blank the ESP and menu while sharing)
    1-7     switch menu pages, Ctrl+Tab / Ctrl+Shift+Tab cycle
    Panic   whatever key you bound on the CONFIG page; none by default

HOW IT WORKS (external, read-only apart from the aimbot)
    - No DLL is injected.
    - Module base is found by walking the remote PEB/LDR module list via
      NtQueryInformationProcess -> PEB -> PEB_LDR_DATA -> module entries,
      with a ToolHelp32 fallback.
    - Entity list / view matrix / netvars are read directly from client.dll.
      The overlay is a transparent, click-through, always-on-top window
      (WS_EX_TRANSPARENT) drawn with GDI+.
    - The ONLY write is the aimbot's dwViewAngles. Recoil control and the
      triggerbot synthesise Windows input instead of poking the game.
    - Netvars are baked from a2x/cs2-dumper and verified against the
      upstream dump, not hand-copied from an offset list.

KEEPING IT WORKING (the important part - offsets drift every update)
    Automatic: the app re-fetches the newest offsets when it starts.
      - sezzyaep/CS2-OFFSETS  -> module offsets (per game build)
      - a2x/cs2-dumper        -> netvars
    Cached in offsets-live.json next to the exe. The CONFIG page also has a
    "Re-fetch offsets" button for mid-session updates.
    No network? it falls back to the baked copy inside the exe.
    Manual / rebuild, after a game update:
      1. Run:  CS2External\update-offsets.ps1
         Downloads the latest module offsets and netvars and patches
         CS2External\Core\Offsets.cs.
      2. Run:  CS2External\build.bat   (publishes and copies the exe here)
    Notes for this build (14188):
      - entity list = client+dwEntityList (page scheme). The engine does NOT
        trust the upstream value here; it measures the pointer that actually
        enumerates and pins the result as EntityListVerified, because a
        wrong-but-plausible value reads as "zero players" with no error.
      - controller stride 0x70, pawn stride 0x70
      - pawn handle: m_hPlayerPawn 0x92C / m_hPawn 0x6BC - the engine
        self-calibrates which one resolves to your own pawn at attach.
      - the view matrix is checked at runtime for standard/transposed
        layout; whichever projects the local player on screen is used.
      - aliveness is m_lifeState (0x354) == 0, not Health > 0. A player who
        drops to 1 HP is alive; a corpse has Health 0 but also has
        lifeState 2, and treating those the same made corpses vanish.
      - player speed for the footstep marker comes from
        C_BaseEntity::m_vecAbsVelocity (0x3F8), not m_vecVelocity (0x430).
        The latter is a quantized network vector and is wrong for anything
        that needs real speed.
    Fallback sources if the updater ever breaks (layout changed):
       - sezzyaep/CS2-OFFSETS  github.com/sezzyaep/CS2-OFFSETS
       - a2x/cs2-dumper        github.com/a2x/cs2-dumper
       - cs2.poggu.me          netvars/offsets site
       - unknowncheats         CS2 forum offset threads

TROUBLESHOOTING
    Overlay invisible
        Game must be Fullscreen Windowed/Borderless. If the status line
        also says "no view matrix", the overlay is running but CS2 is not.
    "OpenProcess denied"
        Run as administrator.
    Status line, two lines top-left:
        line 1: attach + players=A/B (t# e#) + draw:N + aim state + hotkeys
        line 2: version, FPS, stream-proof, offset source, vm layout, diag
        "players" is alive-over-total from the roster, counted BEFORE any
        distance or team filter. "draw" is how many records actually got
        drawn. If players is healthy and draw is 0, a distance/team filter
        is hiding them - check ESP max dist and the per-element filters.
    Menu shows 0 players
        In-game yet? The main menu can legitimately be empty.
    Boxes misplaced or low
        Run "Re-fetch offsets" after a game update. Then try the
        "Bone debug" switch on VISUALS: it labels every raw bone index on
        the skeleton, so a bone-layout drift is visible in one round instead
        of having to be reasoned about.
    Aimbot feels inverted
        Flip the pitch sign in Core\Engine.cs (CalcAngle at the top of
        AimbotStep).
    Aimbot does nothing
        Hold the aim key (Alt by default) with the game focused and an enemy
        inside the FOV circle. It only runs while you are alive and the game
        window is in the foreground.
    GDI+ crash "Exception processing message 0x00000005"
        Should be fixed - every draw value is validated finite and in a sane
        range before it reaches GDI+, and the message loop logs a skipped
        frame instead of dying. If you see it, nyx.log has the stack.

BUILDING FROM SOURCE
    Requires the .NET 8 SDK. In CS2External\:
        build.bat          release publish, then copies the exe up one level
        dotnet build       plain debug/release build, no copying

Credits: offset data by a2x/cs2-dumper (github.com/a2x/cs2-dumper) and
sezzyaep/CS2-OFFSETS (github.com/sezzyaep/CS2-OFFSETS).
