Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- local outSide = "front"
- local inSide = "right"
- term.setBackgroundColor(colors.green)
- local password = "dicks"
- local exPass = "yyuula"
- local openTime = 5
- while true do
- term.clear()
- term.setCursorPos(18,4)
- term.setTextColor(colors.orange)
- print("The Lumber Yard")
- term.setCursorPos(9,6)
- print("Where real men go for ")
- term.setCursorPos(31,6)
- term.setTextColor(colors.brown)
- print("WOOD")
- term.setCursorPos(12,9)
- term.setTextColor(colors.red)
- print("Please enter the password: ")
- term.setTextColor(colors.blue)
- term.setCursorPos(23,11)
- local input = read("*")
- term.setCursorPos(20,12)
- if input == password then
- term.setTextColor(colors.red)
- print("Access granted.")
- rs.setOutput(outSide,true)
- while rs.getInput(inSide) == false do
- sleep(1)
- end
- sleep(openTime)
- rs.setOutput(outSide,false)
- while rs.getInput(inSide) == false do
- sleep(1)
- end
- rs.setOutput(outSide,true)
- while rs.getInput(inSide) == false do
- sleep(1)
- end
- sleep(openTime)
- rs.setOutput(outSide,false)
- elseif input == exPass then
- os.pullEvent = pullEvent
- else
- print("Password incorrect!") -- Prints 'Password incorrect!' to the screen
- sleep(2) -- Waits 2 seconds
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement