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