Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --v1.0 by GraySloth 2013-Feb-15
- --variables
- local sSide = ("top")
- --functions
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function on()
- redstone.setOutput(sSide, true)
- end
- function off()
- redstone.setOutput(sSide, false)
- end
- function pulse()
- on()
- os.sleep(1)
- off()
- end
- --Main
- while true do
- if (os.time() < 6) or (os.time() > 19) then
- on()
- os.sleep(1)
- print("Night")
- else
- off()
- os.sleep(1)
- print("Day")
- end
- os.sleep(1)
- clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment