I was making a gamepass for my game and I have litteraly no idea how to sence it. I already have the shop and everything I am just wanting to know how to make it work.
✓ ANSWER ACCEPTED
how to make a script that sences a gamepass?
2 answers
✓ Accepted answer
https://developer.roblox.com/en-us/api-reference/function/MarketplaceService/UserOwnsGamePassAsync
if game:GetService'MarketplaceService':UserOwnsGamePassAsync(UserId, gamepassId) then
print'player has gamepass'
end
1 comment
0
thanks!
if that does not work try this
game.Players.PlayerAdded:Connect(function(player)
local GamepassID = 17441333
local start1 = Instance.new("BoolValue")
start1.Name = "start1"
start1.Parent = player
start1.Value = false
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,GamepassID) then
start1.Value = true
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I am thinking something like a if statement