uh, thats a no
you can't change a global variable from inside a script without actually putting that variable in the script, which obviously he can't do.
but you could combine this with another custom script that will call the script, have a short delay (1 or 2 sec) which then updates the varible you have set for the player's group
(all names - be it group names, unit names, etc - are just variables)