> ## Documentation Index
> Fetch the complete documentation index at: https://luau.limerence.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Influence

> Filters, gates, aim transforms, force target, and requestShot.

These let you narrow what the legitbot does. Each returns a handle you can `:Release()` to undo, and is auto-released on script unload (same as [Overrides](/overrides/overview)).

## addTargetFilter

```luau theme={null}
api.legitbot.addTargetFilter(
    fn: (player: Player, info: TargetFilterInfo) -> boolean,
    priority: number?
): RegistrationHandle
```

Your `fn` is called once per candidate player. Return `false` to exclude them. If multiple filters exist, a player has to pass all of them.

## addShotGate

```luau theme={null}
api.legitbot.addShotGate(
    fn: (shot: ShotGateInfo) -> boolean,
    priority: number?
): RegistrationHandle
```

Your `fn` is called right before each shot. Return `false` to block it. All gates have to pass for the shot to fire.

## addAimTransform

```luau theme={null}
api.legitbot.addAimTransform(
    fn: (aim: AimTransformInfo) -> Vector3?,
    priority: number?
): RegistrationHandle
```

Your `fn` receives the planned aim point. Return a new `Vector3` to use instead, or `nil` to leave it alone. Lower priorities run first; the highest priority runs last and has the final say.

## forceTarget

```luau theme={null}
api.legitbot.forceTarget(
    player: Player | string | number,
    durationSec: number?
): ForceTargetHandle?
```

Only let the legitbot target one specific player. Accepts a `Player`, a player name, or a `UserId`. Returns `nil` if no matching player is in the server. Without a duration, it stays until you `:Release()` or your script unloads. Calling again replaces the previous force-target.

## clearForcedTarget

```luau theme={null}
api.legitbot.clearForcedTarget(): ()
```

## requestShot

```luau theme={null}
api.legitbot.requestShot(): ()
```

Fire the next available shot, skipping the normal cooldown. Does **not** skip your filters, gates, FOV, autowall, mode, hit chance, or min damage. The request only lasts one frame.

## RegistrationHandle

```luau theme={null}
handle:Release()           -- undo the registration
handle:IsReleased()        -- true if already released
handle:GetPriority()       -- current priority
handle:SetPriority(n)      -- change priority
```

## ForceTargetHandle

```luau theme={null}
handle:Release()           -- stop forcing
handle:IsReleased()        -- true if already released
handle:GetPlayer()         -- the forced player
```

## Examples

```luau theme={null}
-- Don't fire at a specific player
local friend = "Roblox"
api.legitbot.addShotGate(function(shot)
    return shot.player ~= nil and shot.player.Name ~= friend
end)

-- Bias the aim point upward by 0.1 studs (lift toward head)
api.legitbot.addAimTransform(function(aim)
    return aim.aimPoint + Vector3.new(0, 0.1, 0)
end, 10)

-- Force a shot on the next frame
api.legitbot.requestShot()
```
