Advertisement
justync7

ccTunesMusicPlayerCommand

Oct 17th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. if not commands then
  2.   print("no commands, defaulting")
  3.   commands = {}
  4.   commands.execAsync = function() return 0 end
  5. end
  6. commands.noteblock = {}
  7. commands.ints = {
  8.   [0] = "note.harp",
  9.   [1] = "note.bd",
  10.   [2] = "note.snare",
  11.   [3] = "note.hat",
  12.   [4] = "note.bassattack"
  13. }
  14. commands.noteblock.playNote = function(int, note)
  15.   int = commands.ints[int]
  16.   note = math.pow(2, (note-12) /12)
  17.   commands.execAsync("playsound "..int.." @a ~ ~ ~ 1 "..note)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement