Pass ID's help needed

image

Anyone know how I can find this gamepass, I copied it and I went on a random gamepass and put this ID in it but it just says error, im not a scripter but Im trying to help a friend again with changing it, and when I do change the ID to one I made it says its not for sale when I put the pass up for sale??

2 Likes

If it’s a gamepass, use PromtGamePassPurchase.

local id = --id
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local LocalPlayer = Players.LocalPlayer
script.Parent.MouseButton1Down:Connect(function()
    MarketPlaceService:PromptGamePassPurchase(LocalPlayer,id)
end)
1 Like

Your code has a misspelled variables.
Correct code:

local id = --id
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService") 
local LocalPlayer = Players.LocalPlayer
script.Parent.MouseButton1Down:Connect(function()
    MarketPlaceService:PromptGamePassPurchase(LocalPlayer,id)
end)
1 Like

Worth noting that both the above supplied code samples would fail. Marketplace is one word. The incorrect spelling of the service name would result in an error, as GetService is case sensitive.

image

cc @Halalaluyafail3 @Jaguar515_YT

2 Likes

Oh. Anyways, thanks for catching that mistake. I didn’t notice that when I first posted the code.