Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local music = {}
- local musicChannel = {channel = 1}
- local musicLocation = "audio/"
- local musicType = ".wav"
- local volume = 1
- function music:Play(song)
- local file = audio.loadStream(musicLocation .. song .. musicType)
- local play = audio.play(file, musicChannel)
- audio.setVolume(volume, musicChannel)
- end
- function music:Options(event)
- -- process Options event here
- end
- Runtime:addEventListener('Options', music)
- return music
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement