Advertisement
Ewgeniy

Untitled

Sep 22nd, 2021 (edited)
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.87 KB | None | 0 0
  1. local component = require("component")
  2. local computer = require("computer")
  3. local debug = computer.addUser
  4. local gpu = component.gpu
  5. xresolution=60
  6. gpu.setResolution(xresolution,52)
  7. gpu.setBackground(0x202020)
  8. gpu.setForeground(0xFFDD00)
  9. gpu.fill(1,1,xresolution,75," ")
  10. gpu.set((30-(string.len("DeviceCraft Managment"))/2),2,"DeviceCraft Managment")
  11. gpu.set((30-(string.len("By Durex77"))/2),3,"By Durex77")
  12. status1=" [Online] "
  13. status2=" [Offline]"
  14.  
  15. trumod={'NeedMoarCoffe'}
  16.  
  17.  
  18. while true do
  19. d=5
  20. d=d+1
  21. gpu.setForeground(0x8B1A1A)
  22. gpu.set((xresolution/2-(string.len("[Owner]"))/2),d,"[Owner]")
  23. d=d+1
  24.  
  25. for j = 1, #owner do
  26.  
  27. d=d+1
  28. name=owner[j]
  29. prov=debug(name)
  30. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  31. computer.removeUser(name)
  32. end
  33.  
  34. d=d+2
  35. gpu.setForeground(0xCC0000)
  36. gpu.set((xresolution/2-(string.len("[Admin]"))/2),d,"[Admin]")
  37. d=d+1
  38.  
  39. for j = 1, #admin do
  40.  
  41. d=d+1
  42. name=admin[j]
  43. prov=debug(name)
  44. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  45. computer.removeUser(name)
  46. end
  47.  
  48. d=d+2
  49. gpu.setForeground(0x473C8B)
  50. gpu.set((xresolution/2-(string.len("[builder]"))/2),d,"[builder]")
  51. d=d+1
  52.  
  53. for j = 1, #builder do
  54.  
  55. d=d+1
  56. name=builder[j]
  57. prov=debug(name)
  58. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  59. computer.removeUser(name)
  60. end
  61.  
  62. d=d+2
  63. gpu.setForeground(0xCC0000)
  64. gpu.set((xresolution/2-(string.len("[Teh-Admin]"))/2),d,"[Teh-Admin]")
  65. d=d+1
  66.  
  67. for j = 1, #tehadmin do
  68. d=d+1
  69. name=tehadmin[j]
  70. prov=debug(name)
  71. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  72. computer.removeUser(name)
  73. end
  74.  
  75.  
  76. d=d+2
  77. gpu.setForeground(0x0066FF)
  78. gpu.set((xresolution/2-(string.len("[TrueMod]"))/2),d,"[True-Mod]")
  79. d=d+1
  80.  
  81. for j = 1, #trumod do
  82. d=d+1
  83. name=trumod[j]
  84. prov=debug(name)
  85. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  86. computer.removeUser(name)
  87. end
  88.  
  89. d=d+2
  90. gpu.setForeground(0xCD2990)
  91. gpu.set((xresolution/2-(string.len("[Modn]"))/2),d,"[Modn]")
  92. d=d+1
  93.  
  94. for j = 1, #modn do
  95. d=d+1
  96. name=modn[j]
  97. prov=debug(name)
  98. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  99. computer.removeUser(name)
  100. end
  101.  
  102. d=d+2
  103. gpu.setForeground(0xCC0000)
  104. gpu.set((xresolution/2-(string.len("[Don-Mod]"))/2),d,"[Don-Mod]")
  105. d=d+1
  106.  
  107. for j = 1, #donmod do
  108. d=d+1
  109. name=donmod[j]
  110. prov=debug(name)
  111. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  112. computer.removeUser(name)
  113. end
  114.  
  115. d=d+2
  116. gpu.setForeground(0x00FF00)
  117. gpu.set((xresolution/2-(string.len("[Helper]"))/2),d,"[Helper]")
  118. d=d+1
  119.  
  120. for j = 1, #helper do
  121. d=d+1
  122. name=helper[j]
  123. prov=debug(name)
  124. if prov ~= nil then gpu.setForeground(0x00FF00) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status1) else gpu.setForeground(0xFF0000) gpu.set(((xresolution/2)-4-(string.len(name))/2),d,name..status2) end
  125. computer.removeUser(name)
  126. end
  127.  
  128.  
  129. os.sleep(1.5)
  130.  
  131. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement