This is my current code which is in a script in ServerScriptService
local tool = game.Lighting.Glock17
local gamepass = 4893873
local function onPlayerAdded(plr)
local hasPass = false
if game:GetService("GamePassService"):PlayerHasPass(plr, gamepass) then
tool:Clone().Parent = game.Players.LocalPlayer.Backpack
else
print("player doesn't own pass")
end
end
This is an updated script but still doesn't work
local tool = game.Lighting.Glock17
local gamepass = 4893873
local function onPlayerAdded(plr)
local hasPass = false
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr, gamepass) then
tool:Clone().Parent = game.Players.LocalPlayer.Backpack
else
print("player doesn't own pass")
end
end

1 comment
what