local player=game.Players.LocalPlayer
local soundboard=player.PlayerGui.ScreenGui.SoundBoard
local uis=game:GetService'UserInputService'
local gps=game:GetService'GamePassService'
local ms=game:GetService'MarketplaceService'
uis.InputBegan:Connect(function(input)
if input.KeyCode==Enum.KeyCode.B then
if gps:PlayerHasPass(player,967732491)then
soundboard.Visible==not soundboard.Visible
else
ms:PromptPurchase(player,967732491)
end
end
end)
What I want it to do is to check if player has a gamepass. If he/she does - show/hide the sound board and if he/she doesn't - offer him/her to buy the gamepass. But this always suggests player to buy the sound board and when he/she does buy it and press B again - it show that he/she has already bought the gamepass but not the sound board. I need your help!

1 comment
Thank you.