Advertisement
Parlocameon

CC Login Bios

Jul 1st, 2019
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. function c_print(text,color)
  4.  
  5. oldColor = term.getTextColor()
  6. term.setTextColor(color)
  7. print(text)
  8. term.setTextColor(oldColor)
  9.  
  10. end
  11.  
  12. --YOUR LOGIN INFO HERE-----------
  13. local user = "user"
  14. local password = "password"
  15. local favoriteColor = colors.blue
  16. ---------------------------------
  17. term.clear()
  18. xsize,ysize = term.getSize()
  19. title = "Parlocameon Protected Login Protocol"
  20. titlepos = math.ceil(xsize/2-string.len(title)/2)
  21. term.setCursorPos(titlepos,1)
  22. c_print(title,colors.orange)
  23. write("User: ")
  24. useri = read()
  25. if useri == user then
  26. c_print("Valid User",colors.green)
  27. write("Password?: ")
  28. passwordi = read("*")
  29. if password==passwordi then
  30. c_print("Login accepted!",colors.green)
  31. c_print("Welcome, "..user,favoriteColor)
  32. sleep(2)
  33. print("Starting stargate management....")
  34. sleep(2)
  35. shell.run("stargate.lua")
  36. else
  37. c_print("Login denied!",colors.red)
  38. sleep(2)
  39. os.reboot()
  40. end
  41. else
  42. c_print("Invalid User",colors.red)
  43. sleep(2)
  44. os.reboot()
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement