Advertisement
pedrosgali

PedrOS startup

Nov 21st, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.11 KB | None | 0 0
  1. --GLOBAL VARIABLES--
  2.  
  3. osVer = "Alpha v1.0!"
  4. x, y = term.getSize()
  5. startY = math.floor((y / 2) - 2)
  6. black = colors.black
  7. white = colors.white
  8. na = "na"
  9.  
  10. --SCREEN FUNCTIONS--
  11.  
  12. function metaScreen(xPos, yPos, bc, tc, cl)
  13.     if xPos ~= "na" then
  14.         term.setCursorPos(xPos, yPos)
  15.     end
  16.     if cl then
  17.         term.setBackgroundColor(black)
  18.         term.clear()
  19.     end
  20.     if bc ~= "na" then
  21.         term.setBackgroundColor(bc)
  22.     end
  23.     if tc ~= "na" then
  24.         term.setTextColor(tc)
  25.     end
  26. end
  27.  
  28. function drawSplash()
  29.     metaScreen(1, startY, na, na, true)
  30.  
  31.     print("            ___        _      ___  ___  (r)")
  32.     print("           | _ \\___ __| |_ _ / _ \\/ __|")
  33.     print("           |  _/ -_) _' | '_| (_) \\__ \\ ")
  34.     print("           |_| \\___\\__,_|_|  \\___/|___/")
  35.     print(" ")
  36.     print("                    "..osVer)
  37. end
  38.  
  39. function loadBar(t)
  40.     metaScreen(2, y - 1, white, na, false)
  41.  
  42.     for i = 1, x - 2 do
  43.         write(" ")
  44.         sleep(t / x)
  45.     end
  46. end
  47.  
  48. --Program--
  49.  
  50. drawSplash()
  51. loadBar(5)
  52. metaScreen(1, 1, black, na, true)
  53. shell.run("OS/OSMain")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement