Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local user1 = "robin"
- local user2 = "batman"
- local password = "daledo"
- mon = peripheral.wrap("right")
- mon.clear()
- mon.setCursorPos(1,1)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.red)
- print("Welcome to BatOS, please login")
- term.setCursorPos(1,2)
- local user = read()
- if (user == user1) or (user == user2) then
- term.setCursorPos(1,3)
- print("Password: ")
- local pass = read("*")
- if (pass == password) then
- print("Password Correct, Welcome!")
- else
- print("Incorrect password")
- end
- else
- print("Usernme not recognized.")
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement