However, I am looking for a way to put limits on the code that users can run. Namely, I don't want to see somebody kick something off with an infinite loop and lock up the entire game.
I'm pretty sure Garry's Mod uses this approach and I don't think he's had any problems.