How to remove a gamepass I have

I just added and started scripting gamepasses in my game.

At certain parts of the game, I check if the player has the gamepass, and if he doesn’t, I prompt him a purchase via MarketplaceService:PromptGamePassPurchase(pl, gamepassID).

The prompt wasn’t appearing, and I thought I did something wrong, but then through print statements I found out that I already have the gamepass, even tho I just created it and never bought it. I guess as the owner of the game I automatically received the gamepass.

This makes me unable to test certain snippets of code I have.

So the question is, how to delete the gamepass, so I can buy it again? There should be some command for command line I think.

Oh, ok test it in a local server

3 Likes

When you create a gamepass, I believe you own it. You can test it in a local server, and put 1 player.

1 Like

You can always flip the conditional statements in your code (when testing).

if condition then
	--Do code.
end

if not condition then
	--Test code.
end
1 Like

It won’t let me test how gamepass works when the player JUST buys it, but yeah I guess just for testing prompting it will work