Advertisement
xmaanzach

AutoLights Tutorial

Jun 12th, 2018
3,952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. while wait(1.5) do
  2. local light = script.Parent
  3. local hour = tonumber(string.sub(game.Lighting.TimeOfDay, 1, 2))
  4. local dark = false
  5. if hour >= 7 then
  6. print("Apagado")
  7. light.Enabled = dark
  8. end
  9. if hour >= 18 then
  10. print("Prendido")
  11. if dark == false then
  12. dark = true
  13. light.Enabled = dark
  14. end
  15. end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement