# SpyStationScript.ver # A simple script that applies a disguise when a player interacts with the device. using { /Fortnite.com/Devices } using { /Verse.org/Sim } # This is our main Script class. It attaches to the Disguise device. # Think of this as the "Brain" of the Spy Station. spy_station := class(VerseSpeaker): # This is a VARIABLE. # It's like a persistent memory slot in your backpack. # We'll use it to store the "last known player" if we wanted to, # but for now, we just use it to keep the script tidy. last_interaction_time := 0.0 # This is an EVENT. # It's like a tripwire. When the device is interacted with, # this function automatically runs. on_interact(event: DeviceInteractedEvent) -> unit: # 'event' contains info about who triggered it. # We need to find out who the player is. player := event.GetInstigator() # Check if the instigator is actually a player. # (Prevents bots or projectiles from triggering the disguise). if (player != None && player.IsPlayer()): # Here is the MAGIC API call. # We are telling the game engine: # "Apply the Disguise defined in this device to this player." # The Disguise device handles the heavy lifting of # swapping the mesh and animations. player.ApplyDisguise() # Optional: Print a message to the player's chat # so they know it worked. player.SendTextMessage("Disguise Applied! Look cool.")