`code:
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Game}
gulag := class(creative_device):
var PlayersMap:[agent]CustomPlayer = map{}
var GlobalUserUniqueID: int = 1
var tpcheck : int = 1
@editable
DownButNotOut :down_but_not_out_device = down_but_not_out_device{}
Once(Him:agent) : void =
if:
tpcheck = 1
then:
set tpcheck = 2
Print("sssssssss22")
Teleporter.Teleport(Him)
Play.Register(Him)
DownButNotOut.Disable()
Ouch(DamageResult2 : damage_result): void =
Instigator := DamageResult2.Instigator
OnPlayerDamaged(DamageResult : damage_result): void =
if:
Instigator := DamageResult.Instigator?
Agent := Instigator.GetInstigatorAgent[]
tpcheck = 2
then:
Play2.Register(Agent)
Sus.Teleport(Agent)
set tpcheck = 1
HimWins(Him:agent) : void =
Teleporter3.Teleport(Him)
Play.Clear()
AgentWins(Agent: agent) : void =
Teleporter3.Teleport(Agent)
Play2.Clear()
@editable
Play: player_reference_device = player_reference_device{}
@editable
Play2: player_reference_device = player_reference_device{}
@editable
Teleporter: teleporter_device = teleporter_device{}
@editable
Teleporter3: teleporter_device = teleporter_device{}
@editable
Sus : teleporter_device = teleporter_device{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
DownButNotOut.AgentDownedEvent.Subscribe(Once)
Play.TrackedStatChangedEvent.Subscribe(HimWins)
Play2.TrackedStatChangedEvent.Subscribe(AgentWins)
for(Player : GetPlayspace().GetPlayers(), FortCharacter := Player.GetFortCharacter[]):
FortCharacter.DamagedEvent().Subscribe(OnPlayerDamaged)
`