# Import the Verse library for basic functionality using /Fortnite.com/Verse # Import the Fortnite-specific libraries using /Fortnite.com/FortniteVerse # Import the UI library for Billboards using /Fortnite.com/FortniteUI # Define our Lobby Script LobbyScript := class(VerseScript): # This is a "Variable" - a container for data. # Think of it like a Loot Box. It holds something (the rule text). LobbyRules : string = "WAIT FOR START! RULES: NO BUILDING." # This is a "Function" - a block of code that does something. # Think of it like a "Healing Item." You use it, and it fixes your health. # Here, we use it to update the Billboard. UpdateRules := func(): # Find the Billboard device by its name (set in UEFN) # This is like finding a specific prop in your inventory. billboard := Self.GetDevice("MainBillboard") as BillboardDevice # If we found the billboard, update its text if billboard != None: # Set the text property billboard.SetText(LobbyRules) # This is an "Event" - it runs automatically when something happens. # Think of this like a "Storm Timer." When the timer hits zero, the storm closes. # Here, the event is "OnBegin," which runs when the game starts. OnBegin := func(): # Call our UpdateRules function UpdateRules() # Now, let's listen for when the game phase changes. # We want to change the rules when the game actually starts. # This is like a "Trigger" that activates when the match begins. Self.OnPhaseChanged.Add(func(phase: GamePhase): if phase == GamePhase::Playing: # The game has started! Change the rules. LobbyRules = "GAME ON! BUILD EVERYTHING!" UpdateRules() else: # We're back in the lobby. LobbyRules = "WAIT FOR START! RULES: NO BUILDING." UpdateRules() )