Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables
- local GoodSound = game.SoundService.GoodSound
- local play = false
- --script
- script.Parent.MouseButton1Click:Connect(function()
- if play then
- GoodSound.Volume = 1 --volume from the music when it's on
- play = false
- script.Parent.Text = "Mute music" else --you can change the text from the button here between ""
- GoodSound.Volume = 0 --volume from the music when it's off
- play = true
- script.Parent.Text = "Play music" --you can change the text from the button here between ""
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement