Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Songs = {"187031516","183824934","193840096","146048136","170698174","147788015","187743249","181046209","156439632","175091436","148416676"}
- local player = script.Parent.Sound
- local a = 100 --change this to how long you want each song to play (in seconds)
- local maxvolume = 0.5 --change to how loud you want it to be, 0.5 is normal, but it can go up to 1
- local shuffle = coroutine.create(function()
- while true do
- wait(1)
- choice = Songs[math.random(#Songs)]
- print(choice)
- player.SoundId = "http://www.roblox.com/asset/?id="..(choice)
- player:play()
- wait()
- player.Volume = 0
- while wait(0.1) do player.Volume = player.Volume + 0.01 if player.Volume >= maxvolume then break end end
- wait(a)
- while wait(0.1) do player.Volume = player.Volume - 0.01 if player.Volume <= 0 then player:Stop() break end end
- wait(1)
- end
- end)
- coroutine.resume(shuffle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement