Advertisement
VaMinion

beacon_toggle

Dec 19th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. -- Toggles redstone signals on and off whenever it detects a change in the daylight status.
  2. -- Purpose: Lights on at night, off in the day.
  3.  
  4. while true do
  5.  if redstone.getInput("top") then
  6.   print("Turning the lights off.")
  7.   redstone.setOutput("right", false)
  8.   redstone.setOutput("left", false)
  9.   redstone.setOutput("front", false)
  10.   redstone.setOutput("back", false)
  11.   redstone.setOutput("bottom", false)
  12.  else
  13.   print("Turning the lights on.")
  14.   redstone.setOutput("right", true)
  15.   redstone.setOutput("left", true)
  16.   redstone.setOutput("front", true)
  17.   redstone.setOutput("back", true)
  18.   redstone.setOutput("bottom", true)
  19.  end
  20.  os.sleep(60)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement