local C={0;0,0,0,0,255,255,255,255;255,255,255;255;255,255;255,255,255,255;0,0,0,0;0}local v={165;165,165;165;165;210,215;230,255;255,255,255;255;255;255,245,230;215;255;165;165;165;165,165}local o={255,255;255,255,255,100;110;135,255,255;255,255;255;255,255,215;135,110;255,255;255,255;255,255}local X local R local q while true do mam=game.Lighting:GetMinutesAfterMidnight()+timeShift game.Lighting:SetMinutesAfterMidnight(mam)mam=mam/60 game.Lighting.Brightness=amplitudeB*math.cos(mam*(pi/12)+pi)+offsetB var=amplitudeO*math.cos(mam*(pi/12)+pi)+offsetO game.Lighting.OutdoorAmbient=Color3.fromRGB(var,var,var)game.Lighting.ShadowSoftness=amplitudeS*math.cos(mam*(pi/6))+offsetS pointer=math.clamp(math.ceil(mam),1,24)X=(C[pointer%24+1]-C[pointer])*((mam-pointer)+1)+C[pointer]R=(v[pointer%24+1]-v[pointer])*((mam-pointer)+1)+v[pointer]q=(o[pointer%24+1]-o[pointer])*((mam-pointer)+1)+o[pointer]game.Lighting.ColorShift_Top=Color3.fromRGB(X,R,q)wait(waitTime)end
-- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
local rColorList =
	{ 000, 000, 000, 000, 000, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 000, 000, 000, 000, 000 }
local gColorList =
	{ 165, 165, 165, 165, 165, 210, 215, 230, 255, 255, 255, 255, 255, 255, 255, 245, 230, 215, 255, 165, 165, 165, 165, 165 }
local bColorList =
	{ 255, 255, 255, 255, 255, 100, 110, 135, 255, 255, 255, 255, 255, 255, 255, 215, 135, 110, 255, 255, 255, 255, 255, 255 }
local r
local g
local b

while true do
	--time changer
	mam = game.Lighting:GetMinutesAfterMidnight() + timeShift
	game.Lighting:SetMinutesAfterMidnight(mam)
	mam = mam / 60

	--brightness
	game.Lighting.Brightness = amplitudeB * math.cos(mam * (pi / 12) + pi) + offsetB

	--outdoor ambient
	var = amplitudeO * math.cos(mam * (pi / 12) + pi) + offsetO
	game.Lighting.OutdoorAmbient = Color3.fromRGB(var, var, var)

	--shadow softness
	game.Lighting.ShadowSoftness = amplitudeS * math.cos(mam * (pi / 6)) + offsetS

	--color shift top
	pointer = math.clamp(math.ceil(mam), 1, 24)
	r = ((rColorList[pointer % 24 + 1] - rColorList[pointer]) * (mam - pointer + 1)) + rColorList[pointer]
	g = ((gColorList[pointer % 24 + 1] - gColorList[pointer]) * (mam - pointer + 1)) + gColorList[pointer]
	b = ((bColorList[pointer % 24 + 1] - bColorList[pointer]) * (mam - pointer + 1)) + bColorList[pointer]
	game.Lighting.ColorShift_Top = Color3.fromRGB(r, g, b)

	--tick
	wait(waitTime)
end
