I need to know this, because my current code only awards the gun once. How could I change this to work that way?
local passId = 168101268 -- change this to your game pass ID.
function isAuthenticated(player) -- checks to see if the player owns your pass
return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end
game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
wait (10)
local permpack = plr.Backpack
local turretgun = game.Lighting.Turret:clone()
turretgun.Parent = permpack
end
end)

2 comments
What do you mean "more than once"?
The tool is not given everytime the players die and respawn