Okay, Gastric is right that this can bug your character. I was playing around with this script; I took all the nature starting player spells and rogue starting spells so when you choose the rogue option, it would remove all your spells and put these ones in place. This worked on all races that can naturally be a rogue, it did not work on a Tauren witch can't be a rogue by default, it bugs your character, and also causes the server to crash.
This is a highly expandable script though, I will be stealing your script here and working on trying to make it check race before changing your race so it does not bug your character and does not crash the server. I will also try to figure out skills / spells for each class so when you do a class change it makes your character like normal, not a 2 handed sword wielding priest like mine. :P
+Repx2
Here are the natural player creation spells for a rogue, and the natural rogue spells.
NOTE: These are just the spells, not skills I didn't spend anytime removing non-rogue skills!
Code:
Plr->addSpell(81);
Plr->addSpell(203);
Plr->addSpell(204);
Plr->addSpell(522);
Plr->addSpell(668);//Ally Common Language.
Plr->addSpell(669);//Horde Orcish Language.
Plr->addSpell(1180);
Plr->addSpell(1752);
Plr->addSpell(2098);
Plr->addSpell(2382);
Plr->addSpell(2479);
Plr->addSpell(2567);
Plr->addSpell(2764);
Plr->addSpell(3050);
Plr->addSpell(3365);
Plr->addSpell(6233);
Plr->addSpell(6246);
Plr->addSpell(6247);
Plr->addSpell(6477);
Plr->addSpell(6478);
Plr->addSpell(6603);
Plr->addSpell(7266);
Plr->addSpell(7267);
Plr->addSpell(7355);
Plr->addSpell(8386);
Plr->addSpell(9077);
Plr->addSpell(9078);
Plr->addSpell(9125);
Plr->addSpell(16092);
Plr->addSpell(21184);
Plr->addSpell(21651);
Plr->addSpell(21652);
Plr->addSpell(22027);
Plr->addSpell(22810);