local w=TweenInfo.new(300,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)local n=TweenInfo.new(300,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)local N=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local X=N:Create(game.Lighting,w,{ClockTime=14})local t=N:Create(game.Lighting,n,{ClockTime=0})local H=N:Create(game.Lighting,w,{OutdoorAmbient=dayOutdoorAmbient})local q=N:Create(game.Lighting,n,{OutdoorAmbient=nightOutdoorAmbient})local R=N:Create(game.Lighting,w,{Ambient=dayAmbient})local d=N:Create(game.Lighting,n,{Ambient=nightAmbient})local p=N:Create(game.Lighting,w,{Brightness=2})local B=N:Create(game.Lighting,n,{Brightness=0})while wait()do t:Play()q:Play()B:Play()d:Play()wait(n.Time)X:Play()H:Play()p:Play()p:Play()wait(w.Time)end

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
