using { /Fortnite.com/Devices } # We define a simple script that checks the player's score when they step on a plate. # 'Score_Checker' is the name of our script object. Score_Checker: script = # This is a 'Signal'. Think of it as a wire connecting two devices. # When the 'Pressure_Plate' is stepped on, this signal fires. On_Player_Steps: signal() = Pressure_Plate.Stepped # This is the 'Event' that runs when the signal fires. OnBegin(): # 1. Get the Local Player (The Agent) # In Verse, 'Get_Local_Player()' gives us the Agent of the person playing. # If you want to check a *specific* player, you'd pass their Agent ID here. local_player: agent = Get_Local_Player() # 2. Ask the Score Manager for the current score # We use the 'Score_Manager' device we placed in the level. # GetCurrentScore(local_player) asks: "What is this player's score?" # It returns an 'int' (a whole number). current_points: int = Score_Manager.GetCurrentScore(local_player) # 3. Check the score and react # We use an 'if' statement. This is like a decision gate. if current_points > 0: # If score is > 0, turn on the 'Good_Light' switch Good_Light.SwitchOn() # Print a message to the player (like a chat message) Print_To_Player(local_player, "You're a killer! Score: " + As_String(current_points)) else: # If score is 0 (or negative, though unlikely), turn on 'Bad_Light' Bad_Light.SwitchOn() Print_To_Player(local_player, "Newbie alert! Score: " + As_String(current_points)) # This is just to keep the script running so it can listen for events. OnEnd(): pass