Okay so instead of putting work into something I just stole some code from some other guy.
Idea by Tom - Code by whoever this is