Copy and paste the following scripts into 3 separate script files in Unity! Be sure the name of the script is exactly what it shows in the script, otherwise it will break.
If you're interested in learning a bit more about C#, you can learn more, totally free, here: