-- 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:
The player that threw the telepearl
startPos:
The position where the player threw the telepearl
endPos:
The position where the telepearl landed (where the player will teleport to)