-- Tween Info

local dayTweeninfo = TweenInfo.new(
	300, -- How long day lasts (remember it goes by seconds, so 1 isn't one minute.)
	Enum.EasingStyle.Quad, --Easing Style
	Enum.EasingDirection.Out, -- Easing Direction
	0, -- How many times will it reverse
	false, -- Will it reverse
	0 -- Delay
)

local nightTweeninfo = TweenInfo.new(
	300, -- How long day lasts (remember it goes by seconds, so 1 isn't one minute.)
	Enum.EasingStyle.Quad, --Easing Style
	Enum.EasingDirection.Out, -- Easing Direction
	0, -- How many times will it reverse
	false, -- Will it reverse
	0 -- Delay
)




local TweenService = game:GetService("TweenService")

local dayTween = TweenService:Create(game.Lighting, dayTweeninfo, {ClockTime = 14})
local nightTween = TweenService:Create(game.Lighting, nightTweeninfo, {ClockTime = 0})

local dayTweenOutdoorAmbient = TweenService:Create(game.Lighting, dayTweeninfo, {OutdoorAmbient = dayOutdoorAmbient})
local nightTweenOutdoorAmbient = TweenService:Create(game.Lighting, nightTweeninfo, {OutdoorAmbient = nightOutdoorAmbient})

local dayTweenAmbient = TweenService:Create(game.Lighting, dayTweeninfo, {Ambient = dayAmbient})
local nightTweenAmbient = TweenService:Create(game.Lighting, nightTweeninfo, {Ambient = nightAmbient})

local dayTweenBrightness = TweenService:Create(game.Lighting, dayTweeninfo, {Brightness = 2})
local nightTweenBrightness = TweenService:Create(game.Lighting, nightTweeninfo, {Brightness = 0})


while wait() do
	nightTween:Play()
	nightTweenOutdoorAmbient:Play()
	nightTweenBrightness:Play()
	nightTweenAmbient:Play()
	wait(nightTweeninfo.Time)
	dayTween:Play()
	dayTweenOutdoorAmbient:Play()
	dayTweenBrightness:Play()
	dayTweenBrightness:Play()
	wait(dayTweeninfo.Time)
end
