# This is our main script for the race. # It listens for events and counts laps. using { /Fortnite.com/Devices } using { /Verse.org/Sim } # This is our "Scoreboard" variable. # It holds the current lap count. var current_lap: int = 0 # This function runs when a player hits a checkpoint. # "player" is the person playing the game. # "checkpoint" is the device they hit. OnCheckpointHit(player: player, checkpoint: race_checkpoint_device) -> void: # We add 1 to the lap count. current_lap += 1 # Let's say the player is happy! # We print a message to the console. Print($"You hit checkpoint {current_lap}!") # If they finish all laps, they win! if current_lap >= 5: Print("You won the race!") # Here you could add code to show a trophy.