> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/events/useability.md).

# UseAbility

```lua
-- When a player attempts to Recall, turn them invisible for a few seconds
Events.UseAbility(function(event)
    if (event.abilityName == "recall") then
        StatusEffectService.giveEffect(event.entity, StatusEffectType.INVISIBILITY, 6)
    end
end)
```

### Parameters

#### entity: [Entity](/scripting/bedwars-scripting/objects/entity.md)

The entity that used the ability.

#### abilityName: string | [AbilityType](/scripting/bedwars-scripting/types/abilitytype.md)

The ability used by the entity.

#### cancelled: bool <mark style="color:yellow;">\[modifiable]</mark>

If set to true, the ability use will be cancelled.
