This is my code that clones a tool, and puts it in the player's backpack if they own a gamepass. Here it is m8s:
local passID = 695948228
local gamepass = game:GetService("GamePassService")
game.Players.PlayerAdded:connect(function(player, passID)
if gamepass:PlayerHasPass(passID) then
print(player.Name.. " owns the gamepass with the id of " ..passID)
game.ServerStorage.LaserShotGun:Clone(player.Backpack)
end
end)

2 comments
sooooooooo you think code can read your mind and know what player you wanna check?
You don't specify which player to check if has the gamepass. You should use :PlayerHasPass(player, passID). Also take a look at CootKitty's answer for other fixes.