Advertisement
BlazyTheLittleFox

FE music player

Jul 30th, 2018
2,104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Made by Operation6
  2. --Change the ids if u want
  3.  
  4. --Settings--
  5.  
  6. --Feel free to edit the sond_ID, it is the songs that will play.--
  7.  
  8. song_ID = {1633667634,243372213,143959455,142435409,145144013,142295308,155319906,143204341,167769668,158789219,148321914,145168228,145761021,156151206,174359006,165755823,174742374,144174823,176424986,172692704,161103614,148559890,155729113} -- replace the numbers with the ID's of the songs you want. (the URL end number)
  9.  
  10. --DONT TOUCH BELOW--
  11.  
  12. randomizer = true -- set to true to make it in a random way, set to false and it is in order
  13.  
  14. Wait_Time = 115 -- 120 is the max time for a sound/song. Add 5 seconds if you want a buffer between songs
  15.  
  16. inc = .1 -- this is the increment of which the volume increases/decreases for fade in/out.
  17.  
  18. --DONT TOUCH BELOW
  19.  
  20. --functions and IDs--
  21. asset_ID = "http://www.roblox.com/asset/?id="
  22. function choose(tab) local obj = tab[math.random(1,#tab)] return obj end
  23. function play(s) if s:IsA("Sound") then local o = s.Volume s.Volume = 0 s:play() for i = 0,o,inc do wait() s.Volume = i end s.Volume = o end end
  24. function stop(s) if s:IsA("Sound") then local o = s.Volume for i = o,0,-inc do wait() s.Volume = i end s:stop() s.Volume = o end end
  25. song = Instance.new("Sound",workspace) song.Name = "MrRowPro's song player"
  26.  
  27. --DONT TOUCH BELOW--
  28.  
  29.  
  30. --loop--
  31. counter = 1
  32. if #song_ID > 0 then
  33. while true do
  34. wait()
  35. if randomizer then song.SoundId = asset_ID..""..choose(song_ID) else song.SoundId = asset_ID..""..song_ID[counter] end
  36. play(song)
  37. wait(Wait_Time)
  38. stop(song)
  39. if counter >= #song_ID then counter = 1 else counter = counter + 1 end
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement