You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Gamepass bought without error
-
What is the issue? Include screenshots / videos if possible!
The issue is that when i click buy it gives purchase failed error
-
What solutions have you tried so far?
I have tried checking the gamepass id and changing my scripts
I have used 2 scripts
local Button = SG.OpenShopButton
local Frame = SG.MainFrame
local GamepassID1 = 1200373704
local player = game:GetService("Players").LocalPlayer
wait(0.3)
Button.MouseButton1Click:Connect(function()
Frame:TweenPosition(UDim2.new(0.5, 0, 0.5, 0))
end)
Frame.TextButton.MouseButton1Click:Connect(function()
Frame:TweenPosition(UDim2.new(0.5, 0, -0.5, 0))
end)
Frame.ScrollingFrame.Gamepass1.BuyButton.MouseButton1Click:Connect(function()
game:GetService("MarketplaceService"):PromptGamePassPurchase(player, GamepassID1)
end)
The Other is
local SG = script.Parent
local Button = SG.OpenShopButton
local Frame = SG.MainFrame
local GamepassID1 = 1200373704
local player = game:GetService("Players").LocalPlayer
wait(0.3)
Button.MouseButton1Click:Connect(function()
Frame:TweenPosition(UDim2.new(0.5, 0, 0.5, 0))
end)
Frame.TextButton.MouseButton1Click:Connect(function()
Frame:TweenPosition(UDim2.new(0.5, 0, -0.5, 0))
end)
Frame.ScrollingFrame.Gamepass1.BuyButton.MouseButton1Click:Connect(function()
game:GetService("MarketplaceService"):PromptGamePassPurchase(player, GamepassID1)
end)