# Import the tools we need using { /Fortnite.com/Devices } using { /Verse.org/Simulation } # This is our main device secret_door_device := class(creative_device): # This is the trigger pad — wire this in the UEFN Properties panel @editable TriggerPad : trigger_device = trigger_device{} # This is the list of prop devices for the Walls layer. # Add every wall prop_manipulator device here in the Properties panel. @editable WallProps : []prop_manipulator_device = array{} # This is the list of prop devices for the Treasure layer. # Add every treasure prop_manipulator device here in the Properties panel. @editable TreasureProps : []prop_manipulator_device = array{} # This runs when the game starts OnBegin() : void = # Wait for a player to touch the pad, then run on_player_touch TriggerPad.TriggeredEvent.Await() on_player_touch() # This function runs when someone touches the pad on_player_touch() : void = # 1. Hide the 'Walls' layer # This makes the walls disappear for (Wall : WallProps): Wall.Hide() # 2. Show the 'Treasure' layer # This makes the chest appear for (Chest : TreasureProps): Chest.Show() # Optional: Play a sound or effect here! Print("Secret room opened!")