Advertisement
Rukerisu

OS - Startup (diamong digger)

Jun 9th, 2025 (edited)
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. term.clear()
  2. term.setBackgroundColor(colors.black)
  3. term.setTextColor(colors.white)
  4.  
  5. local w, h = term.getSize()
  6.  
  7. -- Function for middle text
  8. local function printCentered(y, text, color)
  9.     local x = math.floor((w - #text) / 2)
  10.     term.setCursorPos(x, y)
  11.     if color then
  12.         term.setTextColor(color)
  13.     else
  14.         term.setTextColor(colors.white)
  15.     end
  16.     term.write(text)
  17. end
  18.  
  19. -- Calculation of Vertical Mid
  20. local centerY = math.floor(h / 2)
  21.  
  22. -- Name of OS
  23. printCentered(centerY - 2, "| OS NAME |", colors.blue)
  24.  
  25. -- Loading Text
  26. printCentered(centerY, "Loading...")
  27.  
  28. -- Progress bar
  29. sleep(1)
  30. term.setCursorPos(math.floor((w - 10) / 2), centerY + 2)
  31. textutils.slowPrint("##########")
  32. sleep(1)
  33.  
  34. -- Start Menu
  35. local monitor = peripheral.wrap("left")
  36. monitor.clear()
  37. shell.run("monitor left screens/title")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement