# Telepearled

```lua
-- When a player uses a telepearl, give them the Decay status effect
Events.Telepearled(function(event)
    local entity = event.player:getEntity()
    if (entity == nil) then
        return
    end
    StatusEffectService.giveEffect(entity, StatusEffectType.DECAY)
end)
```

### Parameters

#### player: [Player](https://docs.easy.gg/scripting/bedwars-scripting/objects/player)

The player that threw the telepearl

#### startPos: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)

The position where the player threw the telepearl

#### endPos: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)

The position where the telepearl landed (where the player will teleport to)
