It sounds like you have the answer to your own question. Global groups are a good way to go if you wish to use a centralized script. Using the IF-ENDIF you can test if a user belongs to the group (having similar resource needs) and execute the appropriate lines of code.