# Import the necessary tools using { /Fortnite.com/Devices } using { /Verse.org/Simulation } using { /EpicGames.com/RealTimeClock } # Define our Vault Script vault_script := class(verse_script): # This is our door. We'll connect it in the editor. Door := property(Door): get => Door # This is our Real Time Clock device. Clock := property(RealTimeClock): get => Clock # This function runs when the game starts OnBegin(): void => # We'll loop forever, checking the time every second loop: # Get the current time from the Real Time Clock # The clock gives us UTC time (0-24 hours) CurrentTime := Clock.GetTime() # Check if the time is between 6 AM (6) and 6 PM (18) # If it is, open the door. If not, close it. if CurrentTime.Hour >= 6 and CurrentTime.Hour < 18: Door.Open() else: Door.Close() # Wait 1 second before checking again Wait(1.0)