Even better way to do the whole don't mount if not admin thing would be to return and not perform the parent function if the client isn't admin.
function serverCmdtoggleStarMode(%client) {
if(!%client.smode){
%client.smode = true;
messageAll('', '\c3Star Gun is in \c0Destroy Mode');
} else {
%client.smode = false;
messageAll('', '\c3Star Gun is in \c0Normal Mode');
}
}
function starGunProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal) {
if(%col.getClassName() $= "fxDTSBrick" && %obj.client.smode) %col.killBrick();
else Parent::onCollision(%this, %obj, %col, %fade, %pos, %normal);
}
function starGunImage::onMount(%this, %obj) {
%client = %obj.client;
if(!%client.isAdmin || !%client.isSuperAdmin) return "";
else Parent::onMount(%this, %obj);
}
function serverCmdstarGun(%client) {
if(%client.isAdmin || %client.isSuperAdmin) {
%client.player.mountImage("starGunImage", 0);
%client.player.playThread(0, armreadyright);
}
}