# Destroy builds device
# x.com/KingCalcFN
# fortnite.com/@kingcalc
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
destroy_builds_device := class(creative_device):
ResetEvent : event() = event() {}
@editable
Trigger : trigger_device = trigger_device{}
@editable
Button : button_device = button_device{}
@editable
ExplosiveDevices: []explosive_device = array{}
OnBegin<override>()<suspends>:void=
Trigger.TriggeredEvent.Subscribe(OnTriggerEvent)
Button.InteractedWithEvent.Subscribe(OnButtonEvent)
OnTriggerEvent(OptAgent: ?agent):void=
ResetBuilds(OptAgent)
OnButtonEvent(Agent: agent):void=
ResetBuilds(option{Agent})
ResetBuilds(OpAgent: ?agent): void=
if(Agent := OpAgent?):
spawn{InitiateExplosiveDevices(Agent)}
OnEnd<override>():void=
ResetEvent.Signal()
InitiateExplosiveDevices(Agent: agent)<suspends>:void=
race:
ResetEvent.Await()
block:
for (Explosive: ExplosiveDevices):
Explosive.Explode(Agent)
Sleep(0.5)
for (Explosive: ExplosiveDevices):
Explosive.Reset()
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)