For ex: i have a script where it clones a gui from the replicatedstorage but when a player dies it just runs the script and which is making doubles over and over ever time a player dies.

How do i fix this?