Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local password = 'admin' --Set your password here
- local side = 'left' --Side in which door is
- local opentime = 3 --How long door will remain open
- while true do
- term.clear()
- term.setCursorPos(1,1)
- term.write('Enter password: ')
- local input = read('*')
- if input == password then
- print('Password correct, unlocking door...')
- rs.setOutput(side, true)
- sleep(opentime)
- rs.setOutput(side, false)
- term.clear()
- term.setCursorPos(1,1)
- print('Welcome to CraftOS 1.7!')
- error()
- else
- print('Password incorrect!')
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement