Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- play = false
- enable = false
- script.Parent.Play.MouseButton1Click:connect(function()
- if play == false and enable == false then
- play = true
- local text = script.Parent.Music
- script.Parent.Play.Text = "Playing Music..."
- wait(3)
- local music = Instance.new("Sound", plr.PlayerGui)
- music.SoundId = "http://www.roblox.com/asset/?id=" .. text.Text
- music.Playing = true
- enable = true
- script.Parent.Play.Text = "PLAY"
- elseif play == true and enable == true then
- play = false
- local text = script.Parent.Play
- text.Text = "Stopping Music..."
- wait(3)
- local music = plr.PlayerGui.Sound
- music:Destroy()
- enable = false
- text.Text = "PLAY"
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement