Advertisement
nezd

CartMan

May 1st, 2016
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. red = component.proxy(component.list("redstone")())
  2. local bottom = 0
  3. local back = 2
  4. function wait(seconds)
  5.   local begin = os.time()
  6.   repeat
  7.     computer.pullSignal(0.05)
  8.   until os.time() - begin >= seconds
  9. end
  10. while true do
  11.   if red.getInput(bottom) > 0 then
  12.     wait(50)
  13.     red.setOutput(back, 15)
  14.     wait(5)
  15.   else
  16.     red.setOutput(back, 0)
  17. end end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement