Generally the best way to do this is to either have a GANI script in one of the player's attrs that sets the player's alpha, or (generally preferred, especially if you'll have lots of different types of effects) to use an attr for storing the desired alpha (and other effects data, like zoom) and use a weapon that loops through all players in the level 20 times a second applying these.
The main problem with your script is that to keep it working you need to trigger serverside 20 times a second, then have the server trigger every player in the level that same number of times per second. With 50 players in a level, that's 50*20+20=1020 triggers per second which is going to be a really bad thing to do.
I haven't reviewed the entire script, but
this is the general idea. Typically I'd rather loop through each player in the level n times per second instead, though; it's faster than having the same work done in GANI scripts (per Stefan). There's an example by Dusty
here that uses a loop, but it's a bit old and messy. The loops are backwards to what I'd generally do.
edit: note that if your only goal is to hide you're better off just using hidePlayer as long as it's enabled on the server.