Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- print(" Welcome Please enter a command")
- print(" [1] open")
- print(" [2] close")
- input = read()
- if input == "1" then
- redstone.setOutput("left", true)
- print("door open")
- redstone.setOutput("right", false)
- sleep(2)
- end
- if input == "2" then
- redstone.setOutput("left", false)
- print("door close")
- redstone.setOutput("right", true)
- sleep(2)
- end
- if input == "3" then
- redstone.setOutput("right", true)
- print("R.door close")
- sleep(2)
- end
- if input == "4" then
- redstone.setOutput("right", false)
- print("R.door open")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement