Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = game.Players.LocalPlayer
- local snd = Instance.new "Sound"
- snd.Parent = "" --Put main part here
- snd.Volume = 1
- --Commands
- player.Chatted:connect(function(chatmessage)
- local soundid = chatmessage:match("'play (%d+)")
- local volume = chatmessage:match("'vol (%d+)")
- local speed = chatmessage:match("'spd (%d+)")
- local loopon = chatmessage:match("'loopon")
- local loopoff = chatmessage:match("'loopoff")
- local stop = chatmessage:match("'stop")
- local pause = chatmessage:match("'pause")
- local play = chatmessage:match("'play")
- if volume then
- snd.Volume = volume
- end
- if soundid then
- snd:Stop()
- snd.SoundId = "rbxassetid://845004586"
- snd:Play()
- end
- if speed then
- snd.Pitch = speed
- end
- if loopon then
- snd.Looped = true
- end
- if loopoff then
- snd.Looped = false
- end
- if stop then
- snd:Stop()
- end
- if pause then
- snd:Pause()
- end
- if play then
- snd:Play()
- end
- end)
- --Plug in things here to be controlled by PlaybackLoudness
- while game:GetService("RunService").RenderStepped:wait() do
- local l = snd.PlaybackLoudness
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement