Skip to main content
Call :Connect(callback). Connections clean up automatically on script unload.
SignalYour 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
Payload types: ShotEvent, TargetEvent, TriggerEvent, MagnetEvent.

Examples

-- 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)