Advertisement
Guest User

login

a guest
May 24th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. -- Stop Termination
  2. os.pullEvent = os.pullEventRaw
  3. -- Clear Screen
  4. term.clear()
  5. term.setCursorPos(1,1)
  6.  
  7. -- Username
  8. username = "CasterBerry"
  9. -- Password
  10. password = "Admin"
  11. -- Get User Info
  12. print("LOGIN")
  13. term.setCursorPos(1,2)
  14. write("Username: ")
  15. user = read()
  16. term.setCursorPos(1,3)
  17. write("Password: ")
  18. pass = read("*")
  19. -- Verify
  20. term.setCursorPos(1,4)
  21. textutils.slowPrint("Verifying...")
  22. if (user == username) then
  23.   if (pass == password) then
  24.     term.setCursorPos(1,5)
  25.     print("Logged In")
  26.     sleep(1)
  27.     term.clear()
  28.     term.setCursorPos(1,1)
  29.     textutils.slowPrint("Loading Caster-OS_241...")
  30.     sleep(5)
  31.     shell.run("Caster-OS_241")
  32.   else
  33.     term.setCursorPos(1,5)
  34.     print("Wrong")
  35.     sleep(1)
  36.     os.reboot()
  37.   end
  38. else
  39.   term.setCursorPos(1,5)
  40.   print("Wrong")
  41.   sleep(1)
  42.   os.reboot()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement