UserOwnsGamePassAsync module

GamepassChecker

Example on how to use it:

local GamepassChecker = require(path.to.GamepassChecker)
local Player = PLAYER
local GamepassId = GAMEPASSID
print(GamepassChecker.UserOwnsGamePassAsync(Player.UserId, GamepassId))
Is the module good?
  • Yes!
  • No.

0 voters

2 Likes

the result is already automatically cached bro :pray:

It isn’t :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray: :pray:

3 Likes

I tested it with MarketplaceService:UserOwnsGamePassAsync() but it returns false after i bought the gamepass

If the user has purchased the pass inside an experience through PromptGamePassPurchase, the UserOwnsGamePassAsync function might return false because of caching behavior. Alternatively, the function might return true even after the user has deleted the pass from their inventory.

I didn’t knew that it had a caching behavior ngl but it doesn’t return true after the player bought the gamepass and this module is fixing that bug

In the code itself you literally use MarketPlaceService:UserOwnsGamepassAsync() so how the frick is this any better bro?

1 Like

Please understand the code first :man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming::man_facepalming:

Literally did. You use MPS:UOGS() [short form, cry about it] and store the checked gamepass in a table so that if it is repeatedly checked it won’t cause lag.

1 Like


It uses only once MarketplaceService:UserOwnsGamePassAsync bec it needs to know if the player owns the gamepass when joined

this one person on the pie chart has to be you :wilted_flower:

2 Likes


I am not

1 Like

Isnt this exploitable? I remember a while ago there was an exploit for PromptGamePassPurchaseFinished that allowed exploiters to pass the Purchased argument as true


clean code btw just fix the types for SafeUserOwnsGamePassAsync

Exploiters can only fire the dev product purchase event

2 Likes

I am going to make this for badges because the badges have a limit

BadgeModule (NO LIMIT TO CALL THE USER HAS A BADGE FUNCTION) - Resources / Community Resources - Developer Forum | Roblox

Whoever is putting yes on the poll is delulu :pray: :pray:

2 Likes

Why would you need this, just store gamepass id in your player’s profile, no need to do any of this skidded gangaloogilation