Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Settings--
- song_ID = {186745378}
- randomizer = true
- Wait_Time = 120
- inc = 2
- --[[OWNER SETTINGS ----
- randomizer = false
- Wait_Time = 115
- inc = .1
- ]]
- --functions and IDs--
- asset_ID = "http://www.roblox.com/asset/?id="
- function choose(tab) local obj = tab[math.random(1,#tab)] return obj end
- 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
- 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
- song = Instance.new("Sound",workspace) song.Name = "infernal's Music Player"
- --loop--
- counter = 1
- if #song_ID > 0 then
- while true do
- wait()
- if randomizer then song.SoundId = asset_ID..""..choose(song_ID) else song.SoundId = asset_ID..""..song_ID[counter] end
- play(song)
- wait(Wait_Time)
- stop(song)
- if counter >= #song_ID then counter = 1 else counter = counter + 1 end
- if stop (song) then song.SoundId = asset_ID..""..choose(song_ID) else song.SoundId = asset_ID..""..song_ID[counter] end
- end
- end
- --infernal. stop looking at this script--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement