I don't know if I have to make all the scripts and parts reset or Roblox already does that when there are no players
Roblox servers do close and reset once everyone leaves. This question has nothing to do with lua, however.