QuickMuffin8782-Alt

Boot screen (by XenusSoft)

Dec 14th, 2020
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.10 KB | None | 0 0
  1. --[[> Copyright XenusSoft 2020 <]]--
  2. --[[>  Use of file is allowed. <]]--
  3.  
  4. parallel.waitForAny(function()
  5.   --< code here >--
  6.   sleep(8) -- remove this, just for show
  7. end, function()
  8.   local title = "Booting CraftOS..." -- Change title to what you perfer for the bootup.
  9.   w, h = term.getSize()
  10.   wm, hm = w/2, h/2
  11.   term.setBackgroundColor(colors.white)
  12.   term.setTextColor(colors.black)
  13.   term.setCursorPos(wm - (#title/2), hm)
  14.   term.clear()
  15.   term.write(title)
  16.   sleep(0.1)
  17.   term.setBackgroundColor(colors.lightGray)
  18.   term.setTextColor(colors.gray)
  19.   term.setCursorPos(wm - (#title/2), hm)
  20.   term.clear()
  21.   term.write(title)
  22.   sleep(0.1)
  23.   term.setBackgroundColor(colors.gray)
  24.   term.setTextColor(colors.lightGray)
  25.   term.setCursorPos(wm - (#title/2), hm)
  26.   term.clear()
  27.   term.write(title)
  28.   sleep(0.1)
  29.   term.setBackgroundColor(colors.black)
  30.   term.setTextColor(colors.white)
  31.   term.setCursorPos(wm - (#title/2), hm)
  32.   term.clear()
  33.   term.write(title)
  34.   sleep(1)
  35.   while true do
  36.     w, h = term.getSize()
  37.     wm, hm = w/2, h/2
  38.     term.clear()
  39.     for i = 1, 2 do
  40.       term.setBackgroundColor(colors.black)
  41.       term.setTextColor(colors.lightGray)
  42.       term.setCursorPos(wm - (#title/2), hm)
  43.       term.write(title)
  44.       sleep(0.025)
  45.       term.clear()
  46.       term.setBackgroundColor(colors.black)
  47.       term.setTextColor(colors.gray)
  48.       term.setCursorPos(wm - (#title/2), hm)
  49.       term.write(title)
  50.       sleep(0.025)
  51.       term.clear()
  52.       term.setBackgroundColor(colors.black)
  53.       term.setTextColor(colors.lightGray)
  54.       term.setCursorPos(wm - (#title/2), hm)
  55.       term.write(title)
  56.       sleep(0.025)
  57.       term.clear()
  58.       term.setBackgroundColor(colors.black)
  59.       term.setTextColor(colors.white)
  60.       term.setCursorPos(wm - (#title/2), hm)
  61.       term.write(title)
  62.       sleep(0.025)
  63.     end
  64.     term.setBackgroundColor(colors.black)
  65.     term.setTextColor(colors.white)
  66.     term.setCursorPos(wm - (#title/2), hm)
  67.     term.clear()
  68.     term.write(title)
  69.     sleep(2)
  70.   end
  71. end)
  72. term.clear()
  73. term.setTextColor(colors.white)
  74. term.setCursorPos(1, 1)
  75.  
Add Comment
Please, Sign In to add comment