Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Soundbar,Locked,Sound=workspace.Soundbar
- Sound=Soundbar.Sound
- local function Chat(plr,msg)
- if msg:sub(1,6):lower()=='sound/' and (not Locked or plr.Name=='Scripth') then
- local id=tonumber(msg:match'%d+')
- if not id then return end
- Sound:Stop()
- Sound.SoundId='rbxassetid://'..msg:match'%d+'
- Sound:Play()
- elseif msg:lower()=='lock/' and plr.Name=='Scripth' then
- Locked=not Locked
- end
- end
- for i,p in next,game.Players:children() do
- p.Chatted:connect(function(m)
- Chat(p,m)
- end)
- end
- game.Players.PlayerAdded:connect(function(p)
- p.Chatted:connect(function(m)
- Chat(p,m)
- end)
- end)
- Sound:Play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement