if ply:IsAdmin() then

Just wondering can I add a code to my lua script like:
if ply:IsModerator() then

Or does it work only for IsAdmin?

It depends on how you determine whether someone is a moderator.

The easiest way to do it is with UserGroups.


http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Player.IsUserGroup)** is what you’re looking for.