b=script.Parent local o,u=6,10 local A,D=17,30 local r=game:service("\076\105\103\104\116\105\110\103")if u==nil then u=0 end if D==nil then D=0 end function TimeChanged()local h=(o+u/60)*60 local U=(A+D/60)*60 if h<U then if r:GetMinutesAfterMidnight()>=h and r:GetMinutesAfterMidnight()<=U then b.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"b.Color=Color3.fromRGB(248,248,248)else b.Material="\078\101\111\110"b.Color=Color3.fromRGB(150,150,150)end elseif h>U then if r:GetMinutesAfterMidnight()>=h or r:GetMinutesAfterMidnight()<=U then b.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"b.Color=Color3.fromRGB(248,248,248)else b.Material="\078\101\111\110"b.Color=Color3.fromRGB(150,150,150)end end end TimeChanged()game.Lighting.Changed:connect(function(o)if o=="\084\105\109\101\079\102\068\097\121"then TimeChanged()end end)

b = script.Parent

local oh,om = 6,10	-- Open Time (hours,minutes) DON'T TOUCH!
local ch,cm = 17,30	-- Close Time (hours, minutes) DON'T TOUCH!

local l = game:service("Lighting")
if (om == nil) then om = 0 end
if (cm == nil) then cm = 0 end


function TimeChanged()
	local ot = (oh + (om/60)) * 60
	local ct = (ch + (cm/60)) * 60
	if (ot < ct) then
		if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
b.Material = ("SmoothPlastic")
b.Color = Color3.fromRGB(248, 248, 248)
		else
b.Material = ("Neon")
b.Color = Color3.fromRGB(150, 150, 150)
		end
	elseif (ot > ct) then
		if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then
b.Material = ("SmoothPlastic")
b.Color = Color3.fromRGB(248, 248, 248)
		else
b.Material = ("Neon")
b.Color = Color3.fromRGB(150, 150, 150)
		end
	end
end

TimeChanged()
game.Lighting.Changed:connect(function(property)
			if (property == "TimeOfDay") then
				TimeChanged()
			end
		end)
