Advertisement
Guest User

startup

a guest
Apr 26th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. while true do
  2.  term.clear()
  3.  term.setCursorPos(1, 1)
  4.  print("          Welcome Please enter a command")
  5.  print(" [1] open")
  6.  print(" [2] close")
  7.  input = read()
  8.   if input == "1" then
  9.   redstone.setOutput("left", true)
  10.   print("door open")
  11.   redstone.setOutput("right", false)
  12.   sleep(2)
  13.  end
  14.   if input == "2" then
  15.   redstone.setOutput("left", false)
  16.   print("door close")
  17.   redstone.setOutput("right", true)
  18.   sleep(2)
  19.  end
  20.   if input == "3" then
  21.   redstone.setOutput("right", true)
  22.   print("R.door close")
  23.   sleep(2)
  24.  end
  25.   if input == "4" then
  26.   redstone.setOutput("right", false)
  27.   print("R.door open")
  28.   sleep(2)
  29.  end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement