# This is our script for the healing trigger. using { /Fortnite.com/Devices } # We create a new script type. # Think of this as the blueprint for our magic floor. healing_floor_script := script() { # This event happens when a player enters the trigger. OnPlayerBeginOverlap := event(player : player) { # We get the player's current health. # It is like checking the water level in the tank. current_health := player.GetHealth() # We decide how much to heal. # Let's add 20 points. heal_amount := 20 # We add the heal amount to the current health. new_health := current_health + heal_amount # We cap the health at 100. # You can't have more than 100 health! if (new_health > 100) { new_health = 100 } # We set the new health on the player. player.SetHealth(new_health) # Optional: Print a message to the console. print("Player healed! New health: ", new_health) } } # This is the main entry point. # It tells the device to use our script. Initialize() { healing_floor_script() }