Added 5 gamepasses to my game that and run this module when the player joins
local GamePassChecker = {}
local MPS = game:GetService("MarketplaceService")
local passmapping = {
[1819880470] = "ExtraConveyor",
[1818549669] = "SuperBundle",
[1819982467] = "TwoTimesAfkRewards",
[1817929694] = "TwoTimesCoins",
[1817473777] = "TwoTimesDamage",
}
function GamePassChecker:Check(plrid, plrdata)
for id, pass in pairs(passmapping) do
local success, owns = pcall(function()
return MPS:UserOwnsGamePassAsync(plrid, id)
end)
if success and owns then
plrdata.GamePasses[pass] = true
end
end
if plrdata.GamePasses.SuperBundle then
for pass, val in pairs(plrdata.GamePasses) do
plrdata.GamePasses[pass] = true
end
end
return plrdata
end
return GamePassChecker
i have a plot system that seems to have delayed its loading when i added the gamepass checking.
is this normal behaviour since it takes time to communicate?
should i add a loading screen or is there a way to make this instant.
** You are now Level 7! **