Advertisement
pan7nikt

Timelock2

Jan 8th, 2020
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. function stilltrue()
  2.     rs.setOutput("left", false)
  3.     os.sleep(4)
  4. end
  5.  
  6. while true do
  7.    shell.run("clear")
  8.    if rs.getInput("right") then
  9.     rs.setOutput("left", true)
  10.     os.sleep(0.5)
  11.     rs.setOutput("left", false)
  12.     os.sleep(4)
  13.     if rs.getInput("right") then
  14.         stilltrue()
  15.     end
  16.    else
  17.       print("redstone OFF")
  18.     rs.setOutput("left", false)
  19.    end
  20.    os.pullEvent("redstone")
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement