Advertisement
Guest User

startup

a guest
May 16th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. textutils.slowPrint("JoeyOS")
  4. term.setCursorPos(1,2)
  5. term.write("Please Login")
  6. term.setCursorPos(1,4)
  7. term.write("Username: ")
  8. username = read()
  9. term.setCursorPos(1,6)
  10. term.write("Password: ")
  11. password = read("*")
  12. if username == "Admin" and password == "Password" then
  13.   term.clear()
  14.   term.setCursorPos(1,1)
  15.   term.write("Welcome, ")
  16.   print(username)
  17.   term.setCursorPos(1,3)
  18. elseif username == "abc" and password == "123" then
  19.   term.clear()
  20.   term.setCursorPos(1,1)
  21.   term.write("Welcome, ")
  22.   print(username)
  23.   term.setCursorPos(1,3)
  24. else
  25.   term.clear()
  26.   term.setCursorPos(10,5)
  27.   term.setTextColor(colors.red)
  28.   textutils.slowPrint("Incorrect username or password.")
  29.   sleep(2)
  30.   os.reboot()
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement