Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------------------
- --DOOR CONTROL PROGRAMME CODED BY PAULLIE [SWL]
- ------------------------------------------------------------
- user = "Will"
- user1 = "Paul"
- user2 = "Dan"
- password = "swl123"
- function clearScreen()
- term.clear()
- term.setCursorPos(1,1)
- end --ends function clearScreen
- function doorPass()
- clearScreen()
- textutils.slowPrint("Hello, please enter your Username")
- term.setCursorPos(1,2)
- write(": ")
- userinput = read()
- --------------------------------------------------------
- --IF STATEMENT FOR USERNAME
- --------------------------------------------------------
- if userinput == user or user1 or user2 then
- term.setCursorPos(1,4)
- textutils.slowPrint("and your Password")
- term.setCursorPos(1,5)
- write(": ")
- userinput1 = read("*")
- --------------------------------------------------------
- --IF STATEMENT FOR Password
- --------------------------------------------------------
- if userinput1 == password then
- clearScreen()
- textutils.slowPrint("Thank You "..userinput)
- rs.setOutput("bottom", true)
- sleep(5)
- rs.setOutput("bottom", false)
- else
- clearScreen()
- textutils.slowPrint("Sorry your password is incorrect please try again!")
- sleep(3)
- os.reboot()
- end
- else
- clearScreen()
- textutils.slowPrint("Sorry your password is incorrect please try again!")
- sleep(3)
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement