:Connect(callback). Connections clean up automatically on script unload.
Payload types: ShotEvent, TargetEvent, TriggerEvent, MagnetEvent.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Legitbot notifications: shots, targets, scope, magnet.
:Connect(callback). Connections clean up automatically on script unload.
| Signal | Your callback receives |
|---|---|
onShotFired | (event): every time the triggerbot fires |
onTargetAcquired | (event): aim locked onto someone new |
onTargetLost | (event): aim let go of its target |
onTriggerArmed | (event): triggerbot lined up and ready to fire |
onTriggerDisarmed | (): triggerbot no longer ready |
onScopeChanged | (scope): active settings scope changed |
onMagnetPull | (event): aim assist pulled your aim |
-- Log the last 5 shots
local log = {}
api.legitbot.onShotFired:Connect(function(event)
table.insert(log, 1, {
name = event.player and event.player.Name,
hitbox = event.hitbox,
dmg = event.predictedDamage,
})
log[6] = nil
end)
-- Branch on the active scope
api.legitbot.onScopeChanged:Connect(function(scope)
if scope == "weapon:ak47" then
-- crank the magnet
end
end)