Library
Here you will find a very complete 2D and 3D audio system that you can integrate into any script.
Functions
Playing Sound
   --2D Sound
    PlayMusicUrl(musicIdentifier, URL, volume, loop, options)
    -- loop and options parameters are optional, so they aren't needed to execute the function
 
    --3D Sound
    PlayMusicUrlPos(musicIdentifier, URL, volume, loop, options)
    -- loop and options parameters are optional, so they aren't needed to execute the function- onPlayStart
- onPlayEnd
- onLoading
- onPlayPause
- onPlayResume
Manipulation with sound
Position(musicIdentifier, Vector3 vec)
-- Will update location of soundDistance(musicIdentifier, newDistance)
-- Will set new playing distance from locationDestroy(musicIdentifier)
-- Will destroy soundPause(musicIdentifier)
-- Will pause soundResume(musicIdentifier)
-- Will resume soundsetVolume(musicIdentifier, volume)
-- volume is from 0.0 to 1.0
-- Will set a new value to volume. Should be used for non 3D soundsetVolumeMax(musicIdentifier, volume)
-- volume is from 0.0 to 1.0
-- will set new value to max volume. Should be used only for 3D soundsetTimeStamp(musicIdentifier, time)
-- will set a new timestamp.setSoundURL(musicIdentifier, url)
-- will set new URL to sound (will play whenever changed)repeatSound(musicIdentifier)
-- will play again the saved sounddestroyOnFinish(musicIdentifier, bool)
-- true = destroy on end / false = do not destroy on end    setSoundLoop(musicIdentifier, bool)
    -- will set a new value to loopsetSoundDynamic(musicIdentifier, bool)
-- will set if the sound is 3D / 3D = trueEffects on sound
fadeOut(musicIdentifier, time)fadeIn(musicIdentifier, time, volume)Events (client side only)
onPlayStart(name, function)
--This event will trigger after the sound
--is loaded and start playing in game.onPlayEnd(name, function)
--This event will be triggered after sound end.onLoading(name, function)
--This event will be triggered when the sound start loading.onPlayPause(name, function)
--This event will be triggered whenever you pause sound.onPlayResume(name, function)
--This event will be triggered whenever you resume sound.Getting info about sound
soundExists(name)
--Will return true/false if sound existsisPaused(name)
--Will return true/false if song is pausedisPlaying(name)
--Will return true/false if song is playingisLooped(name)
--Will return true/false if sound is loopedgetDistance(name)
--Will return distance in IntegergetVolume(name)
--Will return current volume of music.getPosition(name)
--Will return vector3isDynamic(name)
--Will return if sound is 3D or 2D (3D = true, 2D = false)getTimeStamp(name)
--returns current timestampgetMaxDuration(name)
--returns max duration of soundgetLink(name)
--Will return url linkisPlayerInStreamerMode()
--will return if player got streamer mode enabled.getAllAudioInfo()
--Will return array of all soundisPlayerCloseToAnySound()
--will return true if player is close to any sound.getInfo(name)
--Will return an array with info of the sound...
-- return:
{
   volume,          -- value from 0.0 to 1.0
   url ,            -- sound url
   id,              -- id 
   position,        -- will be nil if position isnt set.
   distance,        -- distance in integer
   playing,         -- true/false
   paused,          -- true/false
   loop,            -- true/false
   isDynamic,       -- true/false
   timeStamp,       -- returns current timestamp
   maxDuration,     -- returns max duration of sound
   destroyOnFinish, -- default value is true means after its finish it will destroy it self
}