# This is a Verse script for a Nitro Drifter Spawner. # It makes a car appear when a player touches a trigger. using { /Fortnite.com/Devices } # We create a new "Device" named MyCarSpawner. # This links our code to the device in the game world. device MyCarSpawner : NitroDrifterSpawnerDevice = { # This is the "On Player Enters" event. # It fires when a player walks into the device. OnPlayerEnters := event (player: Player) -> () { # This line spawns the car! # The car appears at the device's location. SpawnVehicle(player) # Let's change the car's color! # We pick a random color from a list. # This makes every car look unique. SetColor(RandColor()) } } # We need a helper function to get a random color. # This keeps our main code clean and easy to read. RandColor := () -> Color { # We pick a random number between 0 and 100. # Then we use that number to pick a color. # This is like rolling dice to pick a color! return Color { R = RandInt(0, 255) / 255.0, G = RandInt(0, 255) / 255.0, B = RandInt(0, 255) / 255.0 } }