Advertisement
wowzers

moosic

Mar 1st, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. --Settings--
  2.  
  3. song_ID = {186745378}
  4.  
  5. randomizer = true
  6.  
  7. Wait_Time = 120
  8.  
  9. inc = 2
  10.  
  11. --[[OWNER SETTINGS ----
  12. randomizer = false
  13. Wait_Time = 115
  14. inc = .1
  15. ]]
  16.  
  17. --functions and IDs--
  18. asset_ID = "http://www.roblox.com/asset/?id="
  19. function choose(tab) local obj = tab[math.random(1,#tab)] return obj end
  20. 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
  21. 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
  22. song = Instance.new("Sound",workspace) song.Name = "infernal's Music Player"
  23.  
  24.  
  25. --loop--
  26. counter = 1
  27. if #song_ID > 0 then
  28. while true do
  29. wait()
  30. if randomizer then song.SoundId = asset_ID..""..choose(song_ID) else song.SoundId = asset_ID..""..song_ID[counter] end
  31. play(song)
  32. wait(Wait_Time)
  33. stop(song)
  34. if counter >= #song_ID then counter = 1 else counter = counter + 1 end
  35. if stop (song) then song.SoundId = asset_ID..""..choose(song_ID) else song.SoundId = asset_ID..""..song_ID[counter] end
  36. end
  37. end
  38.  
  39.  
  40. --infernal. stop looking at this script--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement