Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Toggles redstone signals on and off whenever it detects a change in the daylight status.
- -- Purpose: Lights on at night, off in the day.
- while true do
- if redstone.getInput("top") then
- print("Turning the lights off.")
- redstone.setOutput("right", false)
- redstone.setOutput("left", false)
- redstone.setOutput("front", false)
- redstone.setOutput("back", false)
- redstone.setOutput("bottom", false)
- else
- print("Turning the lights on.")
- redstone.setOutput("right", true)
- redstone.setOutput("left", true)
- redstone.setOutput("front", true)
- redstone.setOutput("back", true)
- redstone.setOutput("bottom", true)
- end
- os.sleep(60)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement