b=script.Parent local g,e=6,10 local V,y=17,30 local p=game:service("\076\105\103\104\116\105\110\103")if e==nil then e=0 end if y==nil then y=0 end function TimeChanged()local M=(g+e/60)*60 local E=(V+y/60)*60 if M<E then if p:GetMinutesAfterMidnight()>=M and p:GetMinutesAfterMidnight()<=E 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 M>E then if p:GetMinutesAfterMidnight()>=M or p:GetMinutesAfterMidnight()<=E 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(g)if g=="\084\105\109\101\079\102\068\097\121"then TimeChanged()end end)
---------------------------------
---Day/Night Script for Blocks---
---------------------------------
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)
