Advertisement
colddddda

Untitled

Oct 17th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. local Soundbar,Locked,Sound=workspace.Soundbar
  2. Sound=Soundbar.Sound
  3.  
  4. local function Chat(plr,msg)
  5. if msg:sub(1,6):lower()=='sound/' and (not Locked or plr.Name=='Scripth') then
  6. local id=tonumber(msg:match'%d+')
  7. if not id then return end
  8. Sound:Stop()
  9. Sound.SoundId='rbxassetid://'..msg:match'%d+'
  10. Sound:Play()
  11. elseif msg:lower()=='lock/' and plr.Name=='Scripth' then
  12. Locked=not Locked
  13. end
  14. end
  15. for i,p in next,game.Players:children() do
  16. p.Chatted:connect(function(m)
  17. Chat(p,m)
  18. end)
  19. end
  20. game.Players.PlayerAdded:connect(function(p)
  21. p.Chatted:connect(function(m)
  22. Chat(p,m)
  23. end)
  24. end)
  25. Sound:Play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement