Advertisement
Guest User

intro

a guest
Mar 3rd, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. local back = colors.lightBlue
  2. local text = colors.black
  3. term.setCursorPos(1,1)
  4. term.setBackgroundColor(back)
  5. term.setTextColor(text)
  6. term.clear()
  7. local function loadFile(file)
  8.   local fh = fs.open(file,"r")
  9.   local rt = {}
  10.   while true do
  11.     local line = fh.readLine()
  12.     if line == nil then
  13.       break
  14.     end
  15.     rt[#rt + 1] = line
  16.   end
  17.   return rt
  18. end
  19. local x,y = term.getSize()
  20. local l = loadFile("/.gamevolt/logot.png")
  21. y = y/2
  22. y = math.ceil(y - #l/2)
  23. x = x/2
  24. x = math.ceil(x - #l[1]/2)
  25. local _y = y
  26. for i,v in pairs(l) do
  27.   term.setCursorPos(x,_y)
  28.   print(v)
  29.   _y = _y + 1
  30. end
  31. sleep(1)
  32. _y = y
  33. local _x = x
  34. for i,v in pairs(l) do
  35.   for i = 1,#v do
  36.     if v:sub(i,i) == " " then
  37.       term.setBackgroundColor(back)
  38.     else
  39.       term.setBackgroundColor(colors.red)
  40.     end
  41.     term.setCursorPos(_x,_y)
  42.     write(v:sub(i,i))
  43.     _x = _x + 1
  44.   end
  45.   _x = x
  46.   _y = _y + 1
  47. end
  48. term.setBackgroundColor(back)
  49. local x,y = term.getSize()
  50. local text = "Presented by GameVolt"
  51. x = math.ceil((x/2)-(#text/2))
  52. y = y - 2
  53. term.setCursorPos(x,y)
  54. sleep(1)
  55. print(text)
  56. sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement