Code that I mostly wrote from my intro to scripting class.