Advertisement
Guest User

startup

a guest
Jan 16th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. --Fancy stuff
  2. os.pullEvent = os.pullEventRaw
  3. local id = idd
  4. term.setBackgroundColor(colors.blue)
  5. term.setTextColor(colors.black)
  6. term.clear()
  7. --rednet | login
  8. rednet.open("top")
  9. term.setCursorPos(1,1)
  10. print"Dark OS Login Screen V1.2 Created by loganole"
  11. term.setCursorPos(8,8)
  12. write"Username: "
  13. user =read()
  14. term.setCursorPos(8,9)
  15. write"Password: "
  16. pass =read("*")
  17. rednet.send(idd,user)
  18. term.setCursorPos(8,10)
  19. print"Connecting To Server"
  20. sleep(1)
  21. rednet.send(idd,pass)
  22. id,message = rednet.receive(7)
  23. --Do not change !
  24. if message =="true" then
  25. term.setCursorPos(8,11)
  26. term.setTextColor(colors.green)
  27. print"Welcome"
  28. sleep(2)
  29. term.setBackgroundColor(colors.black)
  30. term.clear()
  31. sleep(0)
  32. term.setBackgroundColor(colors.black)
  33. term.setTextColor(colors.orange)
  34. term.setCursorPos(1,1)
  35. print(user.. " Logged On")
  36.  
  37. elseif message =="truea" then
  38. term.setCursorPos(8,11)
  39. term.setTextColor(colors.green)
  40. print("Welcome " ..user " [Admin]")
  41. sleep(2)
  42. term.setBackgroundColor(colors.black)
  43. term.clear()
  44. term.setTextColor(colors.orange)
  45. term.setCursorPos(1,1)
  46. print(user.. " [Admin] Logged On")
  47. write("Command > ")
  48. term.setBackgroundColor(colors.black)
  49. local admin = true
  50.  
  51. elseif message =="false" then
  52. term.setCursorPos(8,11)
  53. term.setTextColor(colors.yellow)
  54. print"Username or Password is incorrect"
  55. sleep(2)
  56. os.shutdown()
  57.  
  58. elseif message =="banned" then
  59. term.setCursorPos(8,11)
  60. term.setTextColor(colors.orange)
  61. print"Sorry, Your Account Has Been Banned"
  62. sleep(3)
  63. os.shutdown()
  64.  
  65. else
  66.  term.setCursorPos(8,11)
  67.  term.setTextColor(colors.black)
  68.  print"Cannot connect to server, may be down for maintenance"
  69.  sleep(2)
  70.  os.shutdown()
  71.  
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement