Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- modem = peripheral.wrap("back")
- admin = "Bryceio"
- error = "Error404"
- modem.open(921)
- term.clear()
- term.setCursorPos(1, 1)
- print("Please enter username:")
- user = read()
- modem.transmit(753, 921, user)
- modem.close(921)
- modem.open(123)
- memes, are, king, note, password = os.pullEvent("modem_message")
- if password == error then
- print("Invalid username. Restarting")
- modem.close(123)
- sleep(2)
- shell.run("startup")
- end
- print("Please enter password:")
- pass = read("*")
- if password == pass then
- if user == admin then
- term.clear()
- term.setCursorPos(1, 1)
- print("Welcome, admin")
- modem.close(123)
- else
- term.clear()
- term.setCursorPos(1, 1)
- print("Welcome, "..user)
- modem.close(123)
- shell.run("MainInterface")
- end
- else
- print("Incorrect Password")
- sleep(2)
- modem.close(123)
- shell.run("Login")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement