I don't know off hand if that specific condition works but yes you can use conditionals. You can use any php you want.
Also in your example, if it was to work, you forgot the opening brace, the "{" before "stuff."
Edit- looks like it should work, but you might need to make an array out of the usergroup id's list=
I copied this line from a working mod php:
Code:
if (is_member_of($vbulletin->userinfo, $ugroups))
I believe $ugroups is an array so you'll need to do:
array{2, 5, 6, 7)
I believe...