Advertisement
Guest User

startup

a guest
Mar 25th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.80 KB | None | 0 0
  1. --Fancy stuff
  2. os.pullEvent = os.pullEventRaw
  3. serverid = 1172 --WRITE YOUR LOCAL SERVERID HERE!
  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(serverid,user)
  18. term.setCursorPos(8,10)
  19. print"Connecting To Server"
  20. sleep(1)
  21. rednet.send(serverid,pass)
  22. id,message = rednet.receive(7)
  23. --Do not change !
  24. if id ==serverid and 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. admin = false
  36. print(user.. " Logged On")
  37. write("Command ")
  38.  
  39. elseif id ==serverid and message =="truea" then
  40. term.setCursorPos(8,11)
  41. term.setTextColor(colors.green)
  42. print("Welcome " ..user.. " [Admin]")
  43. sleep(2)
  44. term.setBackgroundColor(colors.black)
  45. term.clear()
  46. term.setTextColor(colors.orange)
  47. term.setCursorPos(1,1)
  48. print(user.. " [Admin] Logged On")
  49. write("Command ")
  50. term.setBackgroundColor(colors.black)
  51. admin = true
  52.  
  53. elseif id ==serverid and message =="false" then
  54. term.setCursorPos(8,11)
  55. term.setTextColor(colors.yellow)
  56. print"Username or Password is incorrect"
  57. sleep(2)
  58. os.shutdown()
  59.  
  60. elseif id ==serverid and message =="banned" then
  61. term.setCursorPos(8,11)
  62. term.setTextColor(colors.orange)
  63. print"Sorry, Your Account Has Been Banned"
  64. sleep(3)
  65. os.shutdown()
  66.  
  67. else
  68.  term.setCursorPos(8,11)
  69.  term.setTextColor(colors.black)
  70.  print"Cannot connect to server, may be down for maintenance"
  71.  sleep(2)
  72.  os.shutdown()
  73.  
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement