I have a problem scripting a gamepass script. It's a script which basically sets a text in a player's gui to see if they have the script or not. It doesn't work for some reason
-- Gamepasses Script
-- Written by CarlPIandog
-- // Variables \\
local id1 = 4657110
-- // Extra Freight Gamepass \\
game.Players.PlayerAdded:connect(function(player)
if game:GetService("GamePassService"):PlayerHasPass(player, id1) then
script.Parent.ExtraFreightOwned.Text = "Extra Freight: Owned"
else
script.Parent.ExtraFreightOwned.Text = "Extra Freight: Not Owned"
end
end)
-- // Gamepass \\
--Paste above and change ids etc

1 comment
use https://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/UserOwnsGamePassAsync