Advertisement
antoniorigo4

HatManLocalAudio

Jul 18th, 2020
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local sound = Instance.new("Sound",script)
  3. sound.Looped = true
  4. local remote = game.Players.LocalPlayer.Character:WaitForChild("RemoteEvent")
  5. remote.OnClientEvent:Connect(function(macaroni,id)
  6. sound.SoundId = "rbxassetid://"..id
  7. sound:Play()
  8. end)
  9. player.Chatted:Connect(function(msg)
  10. if msg:sub(1,5) == "/stop" then
  11. sound:Stop()
  12. end
  13. end)
  14. while true do
  15. wait()
  16. remote:FireServer(sound.PlaybackLoudness)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement