Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local audios=[[Californication:275607744
- Can't/Cant Stop:155199230
- Dani California:161606686
- Otherside:163548096
- Around The World:281851774
- Scar Tissue:165147575
- Snow (Hey Oh):158362020
- The Adventures Of Raindance Maggie:237640582
- Higher Ground:259286286
- A Moment Of Violence:272199863
- The Zephyr Song:281850560
- Dosed:241781830
- Torture Me:302646944
- ]]
- --last one is streetlight manifesto
- audios=audios:lower();
- at={}
- for match in audios:gmatch(".-:%d+") do
- local name, id = match:match("([^:]+):(%d+)")
- print(name, id)
- table.insert(at, {name=name; id=id})
- end
- function play(id, volume, name)
- local a=Instance.new("Sound", workspace)
- a.SoundId="rbxassetid://"..id;
- a.PlayOnRemove=true
- a.Volume=volume and volume or 1
- a:Destroy()
- print("play", name and name or id, "id", id)
- end
- owner.Chatted:connect(function(msg)
- msg=msg:lower()
- if msg:lower():sub(1, 4)=="play" then
- local found=false
- for _, audio in ipairs(at) do
- if audio.name:find(msg:sub(6, -1)) then
- play(audio.id, 1, audio.name)
- found=true;
- break;
- end
- end
- if not found then
- if msg:sub(6, -1):match("%d+") then
- play(msg:sub(6, -1))
- end
- end
- end
- end)
- for _, audio in ipairs(at) do
- play(audio.id, 0, "") --preload audio
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement