Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- IF YOU USE THIS FOR MY TUTORIAL SAVE THE FILE AS "door" WITHOUT EXTENSION
- -- DON'T TOUCH THE CODE IF YOU DON'T UNDERSTAND IT!
- -- IF YOU USE MY CODE AND RELEASE IT ATLREAST GIVE ME SOME CREDIT ^^
- term.clear()
- term.setCursorPos(5,1)
- print "[Door Terminal]"
- term.setCursorPos(2,2)
- print "Please select an option"
- term.setCursorPos(2,3)
- print "[1] Open Door"
- term.setCursorPos(2,4)
- print "[2] Close Door"
- term.setCursorPos(2,5)
- print "[3] Lock system"
- term.setCursorPos(2,6)
- print "[4] Shutdown system"
- term.setCursorPos(2,8)
- write "Option: "
- input = read()
- if input == '1' then
- redstone.setOutput("back", false)
- term.clear()
- shell.run("door")
- sleep(4)
- redstone.setOutput("back", true)
- elseif input == '2' then
- redstone.setOutput("back", true)
- term.clear()
- shell.run("door")
- elseif input == '3' then
- term.setCursorPos(2,11)
- print "Locking the system"
- sleep(1)
- shell.run("startup")
- elseif input == '4' then
- term.setCursorPos(2,11)
- print "System shutdown detected"
- sleep(0.5)
- term.setCursorPos(2,12)
- print "[Closing/Locking door]"
- sleep(1)
- os.shutdown()
- end
- term.clear()
- shell.run("door")
Advertisement
Add Comment
Please, Sign In to add comment