# This is the main script for our LEGO tower using { /Fortnite.com/Devices } using { /Verse.org/Simulation } # We define the devices we will use lego_tower_manager := class(creative_device): # The assembly device controls the tower @editable assembly_device : creative_device = creative_device{} # The trigger detects the player @editable trigger : trigger_device = trigger_device{} # This function runs when the game starts OnBegin() : void = # Connect the trigger to our code # When the trigger fires, run 'OnTriggered' trigger.TriggeredEvent.Subscribe(OnTriggered) # This function runs when a player steps on the pad OnTriggered(Agent : ?agent) : void = # Make the LEGO tower appear # We set it to visible assembly_device.Show() # You can also play a sound here if you want!