# First, we need to tell Verse where to find the Score Manager tools. # Think of this like loading the "Creative Kit" into your inventory. using { /Fortnite.com/Devices } # This is our main script. It's like the blueprint for our rigged box. rigged_loot_box := class(creative_actor): # We need a reference to the Score Manager device. # Think of this as plugging a cable from our box to the scoreboard. score_manager: ScoreManagerDevice = create(ScoreManagerDevice) # This is the "OnBegin" function. It runs once when the game starts. # It’s like the "Loading Screen" phase where the game sets up the rules. OnBegin():void= # For now, we just start. In a real game, you might set initial scores here. # This function runs when the trigger is activated (when a player steps in). # 'player' is the person who stepped on the mat. OnTriggered(player: agent):void= # Step 1: Check the player's current score. # Think of this like looking at your own scoreboard before a match ends. current_points := score_manager.GetCurrentScore(player) # Step 2: Make a decision based on that number. # If they have less than 50 points... if (current_points < 50): # ...set the next activation to award 50 points. # This is like saying, "Give them a pity bonus." score_manager.SetScoreAward(50) else: # ...otherwise, set it to award 10 points. # This is like a "rich tax." score_manager.SetScoreAward(10) # Step 3: Actually award the points. # The SetScoreAward above just *prepares* the points. # We need to trigger the score manager to hand them out. # We do this by activating the score manager itself. score_manager.Activate() # Optional: Give them a weapon or item too, for fun. # player.GiveItem(creative_item) # You'd need to define creative_item