Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while wait(1.5) do
- local light = script.Parent
- local hour = tonumber(string.sub(game.Lighting.TimeOfDay, 1, 2))
- local dark = false
- if hour >= 7 then
- print("Apagado")
- light.Enabled = dark
- end
- if hour >= 18 then
- print("Prendido")
- if dark == false then
- dark = true
- light.Enabled = dark
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement