Savage_Me55iah

nuke control

Dec 14th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. time_on = 15
  2. time_off = 25
  3. status = false
  4. on = true
  5.  
  6. os.startTimer(1)
  7.  
  8. while true do
  9.   event = os.pullEvent()
  10.   status = redstone.getInput("right")
  11.   if status then
  12.     if on then
  13.       rs.setBundledOutput("back", colors.white)
  14.       on = false
  15.       os.startTimer(time_on)
  16.     else
  17.       rs.setBundledOutput("back", 0)
  18.       on = true
  19.       os.startTimer(time_off)
  20.     end
  21.   else
  22.     rs.setBundledOutput("back", 0)
  23.   end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment