praetorianer777

OC Holo Text

Nov 13th, 2016
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local component = require("component")
  2. local holo = component.hologram
  3.  
  4. local CHARS = {}
  5. CHARS["A"] = {}
  6. CHARS["A"][1] = "x   x"
  7. CHARS["A"][2] = "x   x"
  8. CHARS["A"][3] = "xxxxx"
  9. CHARS["A"][4] = "x   x"
  10. CHARS["A"][5] = " xxx "
  11. CHARS["B"] = {}
  12. CHARS["B"][1] = "xxxx "
  13. CHARS["B"][2] = "x   x"
  14. CHARS["B"][3] = "xxxx "
  15. CHARS["B"][4] = "x   x"
  16. CHARS["B"][5] = "xxxx "
  17. CHARS["C"] = {}
  18. CHARS["C"][1] = " xxxx"
  19. CHARS["C"][2] = "x    "
  20. CHARS["C"][3] = "x    "
  21. CHARS["C"][4] = "x    "
  22. CHARS["C"][5] = " xxxx"
  23. CHARS["D"] = {}
  24. CHARS["D"][1] = "xxxx "
  25. CHARS["D"][2] = "x   x"
  26. CHARS["D"][3] = "x   x"
  27. CHARS["D"][4] = "x   x"
  28. CHARS["D"][5] = "xxxx "
  29. CHARS["E"] = {}
  30. CHARS["E"][1] = "xxxxx"
  31. CHARS["E"][2] = "x    "
  32. CHARS["E"][3] = "xxxx "
  33. CHARS["E"][4] = "x    "
  34. CHARS["E"][5] = "xxxxx"
  35. CHARS["F"] = {}
  36. CHARS["F"][1] = "x    "
  37. CHARS["F"][2] = "x    "
  38. CHARS["F"][3] = "xxx  "
  39. CHARS["F"][4] = "x    "
  40. CHARS["F"][5] = "xxxxx"
  41. CHARS["G"] = {}
  42. CHARS["G"][1] = "xxxx "
  43. CHARS["G"][2] = "x   x"
  44. CHARS["G"][3] = "x xx "
  45. CHARS["G"][4] = "x    "
  46. CHARS["G"][5] = " xxx "
  47.  
  48. CHARS["L"] = {}
  49. CHARS["L"][1] = "xxxx "
  50. CHARS["L"][2] = "x    "
  51. CHARS["L"][3] = "x    "
  52. CHARS["L"][4] = "x    "
  53. CHARS["L"][5] = "x    "
  54.  
  55. CHARS["O"] = {}
  56. CHARS["O"][1] = " xxx "
  57. CHARS["O"][2] = "x   x"
  58. CHARS["O"][3] = "x   x"
  59. CHARS["O"][4] = "x   x"
  60. CHARS["O"][5] = " xxx "
  61.  
  62. function printChar(offset, char)
  63.     for i = 1, 5 do
  64.         for j = 0, 5 do
  65.             local c = CHARS[char][i]:sub(j,j)
  66.             if c == "x" then
  67.                 holo.set(j+offset,i,1, true)
  68.                 --print(c)
  69.             end
  70.         end
  71.     end
  72. end
  73.  
  74. holo.setScale(1)
  75. holo.clear()
  76.  
  77. local text = "ABCDEFGLO"
  78. for i = 1, text:len() do
  79.     printChar(i*7, text:sub(i,i))
  80. end
RAW Paste Data