You have to buy the game to get these. The code and the registered email come with a legitimate copy, and it is worth being blunt about the alternatives: codes circulating online are either expired or fake, and "key generator" sites are a reliable way to infect your machine.
School Tycoon is old enough that second-hand copies are inexpensive, which is the easy answer here.