Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. Songs = {"187031516","183824934","193840096","146048136","170698174","147788015","187743249","181046209","156439632","175091436","148416676"}
  2. local player = script.Parent.Sound
  3. local a = 100 --change this to how long you want each song to play (in seconds)
  4. local maxvolume = 0.5 --change to how loud you want it to be, 0.5 is normal, but it can go up to 1
  5. local shuffle = coroutine.create(function()
  6.     while true do
  7.         wait(1)
  8.         choice = Songs[math.random(#Songs)]
  9.         print(choice)
  10.         player.SoundId = "http://www.roblox.com/asset/?id="..(choice)
  11.         player:play()
  12.         wait()
  13.         player.Volume = 0
  14.         while wait(0.1) do player.Volume = player.Volume + 0.01 if player.Volume >= maxvolume then break end end
  15.         wait(a)
  16.         while wait(0.1) do player.Volume = player.Volume - 0.01 if player.Volume <= 0 then player:Stop() break end end
  17.         wait(1)
  18.     end
  19. end)
  20.  
  21. coroutine.resume(shuffle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement