Added a function to prevent the script from being ran twice

Literally the shittiest way to do it but it sort of works