Can you stop repeating code? you just make your scripts harder to read and your work less efficient that way(I suggest you take a look into tables and loops). Also your way of communicating with the server is inefficient, because the checks are done on the client which means they can be bypassed by exploiters. I have left a reply regarding that topic here: