Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- function COMMANDS()
- term.clear()
- term.setCursorPos(1,1)
- print("ENTER COMMAND")
- print("UNLOCK, LOCK, LOGOFF")
- input2 = string.upper(read())
- if input2 == "UNLOCK" then
- redstone.setOutput("back",false)
- print("UNLOCKING")
- sleep(1)
- COMMANDS()
- elseif input2 == "LOCK" then
- redstone.setOutput("back",true)
- print("LOCK")
- sleep(1)
- COMMANDS()
- elseif input2 == "LOGOFF" then
- print("LOGGING OFF")
- sleep(1)
- shell.run("new")
- else
- print("INVALID COMMAND")
- sleep(1)
- COMMANDS()
- end
- end
- pass = "1"
- print("ENTER PASSWORD")
- input = read("*")
- if input == pass then
- print("SUCCESS")
- sleep(2)
- COMMANDS()
- else
- print("DENIED")
- sleep(2)
- shell.run("new")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement