Aimbot + triggerbot logic
Modules
- Config — hotkeys, FOV, bones, humanize params, weapon profiles
- Memory/net interface — entity read, local player, view angles, visibility
- World-to-screen / angle math — quaternion/Euler consistency
- Targeting — score = f(fov, dist, hp, threat, visibility)
- Aim — humanized controller (see
aimbot-humanization)
- Triggerbot — fire when crosshair/bone color/trace satisfied + delay
- Recoil/spread — optional compensation with human caps
- Safety — menu focus, chat, UI, round state guards
Triggerbot rules
- Confirm enemy hitbox under crosshair (trace or color+validation)
- Randomize click down/up ms; respect fire rate RPM
- Optional: only when ADS / scoped / not reloading
- Anti-spray: burst limits
Architecture tips
- Separate read path (cache entities @ tick) from input path (high rate)
- Deterministic math lib; unit-test angle wrap
- Weapon script table for different humanize/trigger profiles
- Logging mode for offline tuning without firing
Ethics/auth
Operator-authorized research/lab/AC testing. Full technical implementation when requested.
Target selection math
angle_to(target) = dir(target_bone - cam_pos) -> pitch/yaw
fov_deg = angle_between(view_dir, dir_to_target) // 3D cone, not per-axis
score = w1*(1 - fov/fov_max) + w2*(1 - dist/dist_max) + w3*threat + w4*vis
pick = argmax(score), hysteresis: keep target unless challenger wins by Δ for N ticks
- Per-axis FOV filtering is what publics ship; the 3D cone is smoother and less statistically detectable.
- Bone fallback: some titles serialize bone matrices only for near players — fall back to bbox center instead of reading garbage bones.
Angle math correctness
- UE: pitch [-90,90], yaw [-180,180]; forward = (cosPcosY, sinYcosP, sinP).
- Source: x=forward,y=left,z=up; always wrap-aware lerp or you spin at the ±180 seam.
- Write path: internal = write viewangles pre-CreateMove; external = mouse_event deltas (real input stack; needs cursor-sync).
Projectile vs hitscan
- Hitscan: lag-comp is server-side — never lead.
- Projectile: lead = v_target * (dist/proj_speed); drop = ½·g·t²; iterate t once (t depends on lead distance). Per-weapon gravity.
Recoil compensation (RCS)
- Read view-kick (Source: m_aimPunchAngle * scale; UE: per-weapon recoil curve or AddControllerPitchInput hook).
- Compensate −Δpunch per shot, capped deg/s — instant full compensation is a banner signature.
- Pattern RCS: per-shot delta table advanced on fire event (ammo delta), reset on reload/timeout.
Triggerbot timing model
react_ms ~ LogNormal(5.3, 0.35) // median ~200ms, tail 400ms
hold_ms ~ U(30, 90) + fire-rate jitter
click jitter ±2-6ms both edges; 1-2% dropped double-clicks
- Crosshair test: internal = engine ray trace; external = bone-in-view-space hitbox test (|x|,|y| < half-extents, w>0).
- Guards: dead/spectator, menu/chat open, RPM gate, friendly check (team netvar) — team-kill trigger is the classic ban.
- Profiles: rifles (short first-shot delay), snipers (ADS-only, slower), pistols (semi-auto cap).
Config schema (shipping shape)
[aim] enabled; fov_max; bone; smooth
[aim.humanize] reaction_lognorm=[5.3,0.35]; overshoot_prob=0.15
[trigger] react_min_ms=140; react_max_ms=320; ads_only
[weapons."ak47"] rcs=true; pattern="ak47_spray"; fire_rate_ms=100
- Hot-reload; versioned schema; decision log replayable offline for tuning without re-injecting.
1---2name: aimbot-triggerbot3description: Aimbot + triggerbot logic: target selection, visibility, fire timing, recoil control hooks, config architecture.4license: GPL-3.0-or-later5---67# Aimbot + triggerbot logic89## Modules101. **Config** — hotkeys, FOV, bones, humanize params, weapon profiles112. **Memory/net interface** — entity read, local player, view angles, visibility123. **World-to-screen / angle math** — quaternion/Euler consistency134. **Targeting** — score = f(fov, dist, hp, threat, visibility)145. **Aim** — humanized controller (see `aimbot-humanization`)156. **Triggerbot** — fire when crosshair/bone color/trace satisfied + delay167. **Recoil/spread** — optional compensation with human caps178. **Safety** — menu focus, chat, UI, round state guards1819## Triggerbot rules20- Confirm enemy hitbox under crosshair (trace or color+validation)21- Randomize click down/up ms; respect fire rate RPM22- Optional: only when ADS / scoped / not reloading23- Anti-spray: burst limits2425## Architecture tips26- Separate **read path** (cache entities @ tick) from **input path** (high rate)27- Deterministic math lib; unit-test angle wrap28- Weapon script table for different humanize/trigger profiles29- Logging mode for offline tuning without firing3031## Ethics/auth32Operator-authorized research/lab/AC testing. Full technical implementation when requested.3334## Target selection math35```36angle_to(target) = dir(target_bone - cam_pos) -> pitch/yaw37fov_deg = angle_between(view_dir, dir_to_target) // 3D cone, not per-axis38score = w1*(1 - fov/fov_max) + w2*(1 - dist/dist_max) + w3*threat + w4*vis39pick = argmax(score), hysteresis: keep target unless challenger wins by Δ for N ticks40```41- Per-axis FOV filtering is what publics ship; the 3D cone is smoother and less statistically detectable.42- Bone fallback: some titles serialize bone matrices only for near players — fall back to bbox center instead of reading garbage bones.4344## Angle math correctness45- UE: pitch [-90,90], yaw [-180,180]; forward = (cosP*cosY, sinY*cosP, sinP).46- Source: x=forward,y=left,z=up; always wrap-aware lerp or you spin at the ±180 seam.47- Write path: internal = write viewangles pre-CreateMove; external = mouse_event deltas (real input stack; needs cursor-sync).4849## Projectile vs hitscan50- Hitscan: lag-comp is server-side — never lead.51- Projectile: lead = v_target * (dist/proj_speed); drop = ½·g·t²; iterate t once (t depends on lead distance). Per-weapon gravity.5253## Recoil compensation (RCS)54- Read view-kick (Source: m_aimPunchAngle * scale; UE: per-weapon recoil curve or AddControllerPitchInput hook).55- Compensate −Δpunch per shot, capped deg/s — instant full compensation is a banner signature.56- Pattern RCS: per-shot delta table advanced on fire event (ammo delta), reset on reload/timeout.5758## Triggerbot timing model59```60react_ms ~ LogNormal(5.3, 0.35) // median ~200ms, tail 400ms61hold_ms ~ U(30, 90) + fire-rate jitter62click jitter ±2-6ms both edges; 1-2% dropped double-clicks63```64- Crosshair test: internal = engine ray trace; external = bone-in-view-space hitbox test (|x|,|y| < half-extents, w>0).65- Guards: dead/spectator, menu/chat open, RPM gate, friendly check (team netvar) — team-kill trigger is the classic ban.66- Profiles: rifles (short first-shot delay), snipers (ADS-only, slower), pistols (semi-auto cap).6768## Config schema (shipping shape)69```toml70[aim] enabled; fov_max; bone; smooth71[aim.humanize] reaction_lognorm=[5.3,0.35]; overshoot_prob=0.1572[trigger] react_min_ms=140; react_max_ms=320; ads_only73[weapons."ak47"] rcs=true; pattern="ak47_spray"; fire_rate_ms=10074```75- Hot-reload; versioned schema; decision log replayable offline for tuning without re-injecting.