This is the code I use for gamepass tools.
local id = 0000000 --Change this to the gamepass id you want
game.Players.PlayerAdded:connect(function(player)
if Game:GetService("GamePassService"):PlayerHasPass(player, id) then --Added the Parameters
local clone = game.ServerStorage.VoidSword:Clone() -- You need the parenthesis and to determine where it will be parented to
clone.Parent = player:WaitForChild("Backpack") --In this game the player's Backpack
print(player.Name .. " has the game pass!")
else
print(player.Name .. " doesn't have the game pass...")
end
end)
But when the player dies after receiving the tool, it doesn't appear in the player's backpack again. (Credit to yougottols1 for helping me with the script)

1 comment
Thanks!