xXm0dzXx

Untitled

May 19th, 2012
812
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. local monitor = peripheral.wrap("back")
  2.  
  3. local cPrint = function(text)
  4. local x, y = term.getSize()
  5. local x2,y2 = term.getCursorPos()
  6. term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  7. print(text)
  8. end
  9.  
  10. local cSlowPrint = function(text)
  11. local x, y = term.getSize()
  12. local x2,y2 = term.getCursorPos()
  13. term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  14. textutils.slowPrint(text)
  15. end
  16.  
  17. function playMovie(path)
  18. term.redirect(monitor)
  19. intro()
  20. shell.run("clear")
  21. shell.run(path)
  22. term.restore()
  23. end
  24.  
  25. function intro()
  26. shell.run("clear")
  27. term.setCursorPos(5,3)
  28. write(" _ _ _ _ _ _ \n")
  29. term.setCursorPos(5,4)
  30. write(" /\\ \\ _ /\\ \\ /_/\\ /\\ \\ /\\_\\ / /\\ \n")
  31. term.setCursorPos(5,5)
  32. write(" / \\ \\ /\\_\\ / \\ \\\\ \\ \\ \\ \\_\\ / / / _ / / \\ \n")
  33. term.setCursorPos(5,6)
  34. write(" / /\\ \\ \\_/ / // /\\ \\ \\\\ \\ \\__/ / / \\ \\ \\__ /\\_\\ / / /\\ \\__ \n")
  35. term.setCursorPos(5,7)
  36. write(" / / /\\ \\___/ // / /\\ \\_\\\\ \\__ \\/_/ \\ \\___\\ / / // / /\\ \\___\\ \n")
  37. term.setCursorPos(5,8)
  38. write(" / / / \\/____// /_/_ \\/_/ \\/_/\\__/\\ \\__ / / / / \\ \\ \\ \\/___/ \n")
  39. term.setCursorPos(5,9)
  40. write(" / / / / / // /____/\\ _/\\/__\\ \\ / / / / / / \\ \\ \\ \n")
  41. term.setCursorPos(5,10)
  42. write(" / / / / / // /\\____\\/ / _/_/\\ \\ \\ / / / / / /_ \\ \\ \\ \n")
  43. term.setCursorPos(5,11)
  44. write(" / / / / / // / /______ / / / \\ \\ \\ / / /___/ / //_/\\__/ / / \n")
  45. term.setCursorPos(5,12)
  46. write("/ / / / / // / /_______\\ / / / /_/ // / /____\\/ / \\ \\/___/ / \n")
  47. term.setCursorPos(5,13)
  48. write("\\/_/ \\/_/ \\/__________/ \\/_/ \\_\\/ \\/_________/ \\_____\\/ \n")
  49. term.setCursorPos(5,14)
  50.  
  51. print()
  52. print()
  53. print()
  54. cSlowPrint("Theaters")
  55. cSlowPrint("2012")
  56. print()
  57. sleep(0.5)
  58. cSlowPrint("Presents")
  59. sleep(2)
  60. end
  61.  
  62. shell.run("clear")
  63. print("Movies: ")
  64. print("1; Starwars")
  65. print("2; Intro Only")
  66. print()
  67. print("V; Update")
  68. write("Selection: ")
  69. select = read()
  70. if select == "1" then
  71. playMovie("rom/programs/secret/alongtimeago")
  72. elseif select == "2" then
  73. term.redirect(monitor)
  74. intro()
  75. term.restore()
  76. elseif select == "V" then
  77. fs.delete("startup")
  78. shell.run("pastebin","get","tdpeRxXJ","startup")
  79. os.reboot()
  80. end
Advertisement
Add Comment
Please, Sign In to add comment