Gui play script
function click()
game.Players.LocalPlayer.Character.Sounds.SoundId = "http://www.roblox.com/asset/?id=" .. game.Players.LocalPlayer.PlayerGui.radio.Frame.ID.Text
game.Players.LocalPlayer.Character.Sounds:Play()
end
script.Parent.MouseButton1Click:Connect(click)
script that activates gui and adds sound (Shortened)
local player = game.Players.LocalPlayer
script.Parent.Parent.MouseButton1Click:Connect(function()
if player.PlayerGui.radio.Frame.Visible == false then
player.PlayerGui.radio.Frame.Visible = true
elseif player.PlayerGui.radio.Frame.Visible == true then
player.PlayerGui.radio.Frame.Visible = false
end
if player.Character:FindFirstChild("Sounds") == nil then
local ss = Instance.new("Sound")
ss.Parent = player.Character
ss.Name = "Sounds"
ss.Looped = true
ss.Volume = 1
ss.MaxDistance = 1
end
end
full script
local GamePassService = game:GetService('GamePassService')
local PlayersService = game:GetService('Players')
local player = game.Players.LocalPlayer
local ID = 3265754
local player = game.Players.LocalPlayer
script.Parent.Parent.MouseButton1Click:Connect(function()
if game:GetService("MarketplaceService"):PlayerOwnsAsset(player, ID) then
if player.PlayerGui.radio.Frame.Visible == false then
player.PlayerGui.radio.Frame.Visible = true
elseif player.PlayerGui.radio.Frame.Visible == true then
player.PlayerGui.radio.Frame.Visible = false
end
if player.Character:FindFirstChild("Sounds") == nil then
local ss = Instance.new("Sound")
ss.Parent = player.Character
ss.Name = "Sounds"
ss.Looped = true
ss.Volume = 1
ss.MaxDistance = 1
end
else game:GetService("MarketplaceService"):PromptPurchase(player, ID)
end
end)

2 comments
well i'll just assume this is on a local script right?
its not working and no output