Here's an article on writing external pages -
[How-To] vBulletin API Basics: Creating Custom Pages & Misc. And you'll see that they include global.php and then can use the user variables and templates and such.
The condition for a usergroup would be (using usergroup 6 here):
PHP Code:
if (is_member_of($vbulletin->userinfo, 6))
or for multiple usergroups:
PHP Code:
if (is_member_of($vbulletin->userinfo, x,y,z))