Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Add your music IDs here, these are just random samples:
- local music = {
- "181547615",
- "130844430"
- }
- local randomized = false --Change to true if you want the music randomized
- --Do not touch unless you know what you're doing.
- local f = Instance.new("Folder"); f.Parent = workspace; f.Name = "music"
- for i=1, #music do
- local s = Instance.new("Sound");s.Parent = f;s.SoundId = "rbxassetid://"..music[i]
- end
- if randomized == true then
- while wait() do
- local fc = f:GetChildren()
- local rand = math.random(#fc)
- fc[rand]:Play()
- wait(0.5)
- wait(fc[rand].TimeLength)
- fc[rand]:Stop() --pause the music
- end
- else
- local fc = f:GetChildren()
- while wait() do
- for i,v in pairs(fc) do
- v:Play()
- wait(0.5)
- wait(fc.TimeLength)
- fc:Stop()
- end
- end
- end
- --by pyccknnxakep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement