Could someone give me a scripting example of how you would put an ID into a GUI, and have the template of what ID you inputted change the player who typed the ID's sword template??

Like in code, not an explanation please, I can't figure out how I'd do this...