Basically, this script should prompt you if you don't own a game pass id and if you do it will change a value in workspace. Unsure what this error means? Here is the code:
local id = 5242880
local UserId = game.Players.LocalPlayer.UserId
script.Parent.MouseButton1Click:Connect(function()
game:GetService("MarketplaceService"):PromptGamePassPurchase(UserId, id)
script.Parent.Parent.Status.Text = "In order to be a Middle rank you need to buy the gamepass."
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(UserId,id) then
game.Workspace.Middle.Value = true
else
wait(7)
script.Parent.Parent.Status.Text = ""
end
end)

1 comment
Where is the script located?