This script will switch through day and night automatically over a period of time.
game.Lighting.FogEnd = 25
game.Lighting.FogColor=Color3.new(0, 0, 0)