Are you centrally looking to learn how to write and debug a script?
If so, please start with the TLDP link and the introductory bash scripting materials available there and (depending on how much of this you'll be doing) work up to the advanced bash scripting guide that's available there.
From what is posted, the Admin variable isn't being set.
Some of the [ ] syntax around the scutil call and near the first Admin02 reference looks wrong, too. I'd expect that to be an if, and there's a missing fi for that nested block.
And there's a == around, which I'd expect is intended to be a =
And you don't want spaces around the = character.
And the then is on the wrong side of the current MBP name.
And FWIW, the dsconfigad command will likely need to be sudo dsconfigad, or the script invoked as sudo. And I'd not test with -groups, I'd use -show or some such; start with a command that won't make changes to AD if something in the script goes sideways during testing.
If /usr/sbin is in your PATH, then you don't need to specify it.
As for debugging, insert an echo $admin command before that test, and see what's stored there.
To see what's happening with what I've written, extract what I've posted previously, and test with it using echo commands or related.
If you're not looking to learn bash scripting but are rather seeking somebody to write this shell script for you, then you'll want to explain what you want to happen here in a little more detail, and provide a little more background on the environment. From what I can infer from the code you've posted, it looks like you want to perform the AD operation to modify the groups (only) if the user is on a specifically-named system, and apparently also with something involving Admin02 group (or user?), but that latter part is not clear (to me).