Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- password = "pass"
- debug = "debug"
- doorSide = "right"
- doorTime = 4
- alarmSide = "left"
- alarmTime = 10
- -------------------------------------------------------------
- term.clear()
- term.setCursorPos(1, 1)
- write("Enter your password: ")
- input = read("*")
- term.clear()
- term.setCursorPos(1, 1)
- if input == password then
- textutils.slowPrint("Password Correct!")
- term.setCursorPos(1, 2)
- print("The door will open now for " .. doorSide .. " seconds")
- rs.setOutput(doorSide, true)
- sleep(doorTime)
- rs.setOutput(doorSide, false)
- os.reboot()
- elseif input == debug then
- exit()
- term.clear()
- else
- textutils.slowPrint("Password Incorrect!")
- term.setCursorPos(1, 2)
- textutils.slowPrint("Run Away!")
- rs.setOutput(alarmSide, true)
- sleep(alarmTime)
- rs.setOutput(alarmSide, false)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement