# Import the necessary Verse frameworks using /Fortnite.com/Devices using /Engine/Systems # Define our Main Device. This is the "Brain" of our trap. # It will watch for players and then load the next floor. type LoadNextFloorDevice = script { # The Trigger that detects the player Trigger: trigger_device = device:trigger_device() # The Level Loader that holds our hidden floor HiddenFloorLoader: level_loader_device = device:level_loader_device() # The name of the level we want to load (must match your saved Level Instance) LevelToLoad: string = "Secret_Basement" # This runs when the game starts OnBegin(): void = ( # Connect the Trigger to our function Trigger.OnBegin += OnPlayerEntered ) # This function runs when the trigger is activated OnPlayerEntered(trigger: trigger_device, player: player): void = ( # Check if the player who triggered it is the local player (optional) # or if we just want to load the level for everyone. # Load the level from our library # We use the 'Load' method on the Level Loader device HiddenFloorLoader.Load(LevelToLoad) # Optional: Rotate it or move it programmatically # HiddenFloorLoader.SetRotation(90.0) ) }