Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- textutils.slowPrint("JoeyOS")
- term.setCursorPos(1,2)
- term.write("Please Login")
- term.setCursorPos(1,4)
- term.write("Username: ")
- username = read()
- term.setCursorPos(1,6)
- term.write("Password: ")
- password = read("*")
- if username == "Admin" and password == "Password" then
- term.clear()
- term.setCursorPos(1,1)
- term.write("Welcome, ")
- print(username)
- term.setCursorPos(1,3)
- elseif username == "abc" and password == "123" then
- term.clear()
- term.setCursorPos(1,1)
- term.write("Welcome, ")
- print(username)
- term.setCursorPos(1,3)
- else
- term.clear()
- term.setCursorPos(10,5)
- term.setTextColor(colors.red)
- textutils.slowPrint("Incorrect username or password.")
- sleep(2)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement