Advertisement
k_goos

Popcorn

Mar 16th, 2013
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local tickTime = 0.1
  2. function Melodie()
  3. m.playNote(4,5)
  4. m.playNote(2,7)
  5. m.playNote(0,17)
  6. sleep(tickTime * 2)
  7. m.playNote(4,17)
  8. m.playNote(0,12)
  9. sleep(tickTime)
  10. m.playNote(4,12)
  11. sleep(tickTime)
  12.  
  13. m.playNote(4,5)
  14. m.playNote(2,7)
  15. m.playNote(0,8)
  16. sleep(tickTime * 2)
  17. m.playNote(4,17)
  18. m.playNote(0,12)
  19. sleep(tickTime)
  20. m.playNote(4,12)
  21. sleep(tickTime)
  22.  
  23. m.playNote(4,5)
  24. m.playNote(2,7)
  25. m.playNote(0,5)
  26. sleep(tickTime * 2)
  27. m.playNote(4,17)
  28. sleep(tickTime)
  29. m.playNote(4,12)
  30. sleep(tickTime)
  31. end
  32. function OhterMelodie()
  33. m.playNote(4,5)
  34. m.playNote(2,7)
  35. m.playNote(0,17)
  36. sleep(tickTime * 2)
  37. m.playNote(4,17)
  38. m.playNote(0,19)
  39. sleep(tickTime)
  40. m.playNote(4,12)
  41. sleep(tickTime)
  42.  
  43. m.playNote(4,20)
  44. m.playNote(2,7)
  45. m.playNote(0,20)
  46. sleep(tickTime * 2)
  47. m.playNote(4,20)
  48. m.playNote(0,19)
  49. sleep(tickTime)
  50. m.playNote(4,20)
  51. sleep(tickTime)
  52.  
  53. m.playNote(4,12)
  54. m.playNote(2,7)
  55. m.playNote(0,20)
  56. sleep(tickTime)
  57. m.playNote(4,19)
  58. sleep(tickTime)
  59. m.playNote(4,20)
  60. m.playNote(0,17)
  61. sleep(tickTime)
  62. m.playNote(4,17)
  63. sleep(tickTime)
  64.  
  65. m.playNote(4,19)
  66. m.playNote(2,7)
  67. m.playNote(0,19)
  68. sleep(tickTime * 2)
  69. m.playNote(4,19)
  70. m.playNote(0,17)
  71. sleep(tickTime)
  72. m.playNote(4,19)
  73. sleep(tickTime)
  74. m.playNote(4,19)
  75. sleep(tickTime)
  76.  
  77. m.playNote(4,10)
  78. m.playNote(2,7)
  79. m.playNote(0,19)
  80. sleep(tickTime)
  81. m.playNote(4,17)
  82. sleep(tickTime)
  83. m.playNote(4,19)
  84. m.playNote(0,15)
  85. sleep(tickTime)
  86. m.playNote(4,15)
  87. sleep(tickTime)
  88. --112 Ended
  89. end
  90. mon = peripheral.wrap("top")
  91. m = peripheral.wrap("bottom")
  92.  
  93. mon.clear()
  94. mon.setTextScale(2)
  95. mon.setCursorPos(15,2)
  96. mon.write("Popcorn")
  97.  
  98. for i = 0, 3 do
  99. for i = 0, 2 do
  100. m.playNote(4,5)
  101. m.playNote(2,7)
  102. sleep(tickTime * 2)
  103. m.playNote(4,17)
  104. sleep(tickTime)
  105. m.playNote(4,12)
  106. sleep(tickTime)
  107. end
  108. -- Different
  109. m.playNote(4,5)
  110. m.playNote(2,7)
  111. sleep(tickTime)
  112. m.playNote(4,9)
  113. sleep(tickTime)
  114. m.playNote(4,10)
  115. sleep(tickTime)
  116. m.playNote(4,12)
  117. sleep(tickTime)
  118. end
  119.  
  120. for i = 0, 3 do
  121. m.playNote(4,5)
  122. m.playNote(2,7)
  123. sleep(tickTime * 2)
  124. m.playNote(4,17)
  125. sleep(tickTime)
  126. m.playNote(4,12)
  127. sleep(tickTime)
  128. end
  129. --Start melodie
  130. m.playNote(4,5)
  131. m.playNote(2,7)
  132. m.playNote(0,17)
  133. sleep(tickTime)
  134. m.playNote(4,9)
  135. sleep(tickTime)
  136. m.playNote(4,10)
  137. m.playNote(0,15)
  138. sleep(tickTime)
  139. m.playNote(4,12)
  140. sleep(tickTime)
  141.  
  142. Melodie()
  143.  
  144. m.playNote(4,5)
  145. m.playNote(2,7)
  146. m.playNote(0,17)
  147. sleep(tickTime * 2)
  148. m.playNote(4,17)
  149. m.playNote(0,15)
  150. sleep(tickTime)
  151. m.playNote(4,12)
  152. sleep(tickTime)
  153.  
  154. Melodie()
Advertisement
RAW Paste Data Copied
Advertisement