It sounds like your scripts are segfaulting. Make sure you aren't doing anything too irrational; even if it compiles, that doesn't necessarily mean it will work.
If it only crashes after a few seconds, regardless of what happens, make sure to check your timers and that all of the variables being referenced are valid, that any files that you're reading and writing exist and contain the data you need, and that any functions you're using that require a player to be connected check to see if the player is connected first.