Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent.TextButton.MouseButton1Click:Connect(function()
- script.Parent.Frame.Visible = not script.Parent.Frame.Visible
- end)
- script.Parent.Frame.Play.MouseButton1Click:Connect(function()
- local number = "rbxassetid://"..script.Parent.Frame.IDInput.Text
- script.Parent.Sound:Stop()
- wait(0.5)
- script.Parent.Sound.SoundId = number
- wait(1)
- script.Parent.Sound:Play()
- script.Parent.Sound.Looped = true
- end)
- script.Parent.Frame.Stop.MouseButton1Click:Connect(function()
- script.Parent.Sound:Stop()
- end)
- script.Parent.Frame.Pause.MouseButton1Click:Connect(function()
- if script.Parent.Sound.IsPaused == true then
- script.Parent.Sound:Resume()
- script.Parent.Frame.Pause.Text = "Pause"
- elseif script.Parent.Sound.IsPaused == false then
- script.Parent.Sound:Pause()
- script.Parent.Frame.Pause.Text = "Resume"
- end
- end)
- local volumeinput = script.Parent.Frame.VolumeInput
- local idinput = script.Parent.Frame.IdInput
- volumeinput:GetPropertyChangedSignal("Text"):Connect(function()
- if tonumber(volumeinput.Text) then
- script.Parent.Sound.Volume = volumeinput.Text
- else
- --Not number
- end
- end)
- idinput:GetPropertyChangedSignal("Text"):Connect(function()
- if tonumber(idinput.Text) then
- script.Parent.Sound.SoundId = "rbxassetid://"..idinput.Text
- wait(1)
- script.Parent.Sound:Play()
- script.Parent.Sound.Looped = true
- else
- --Not number
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment