tool = game.ReplicatedStorage.Tool game.Players.PlayerAdded:connect(function(player) local allow = game:GetService('BadgeService'):UserHasBadge(player.userId, 289963623) if allow then local Clone = tool:Clone() local Clone2 = tool:Clone() local Backpack = player:WaitForChild("Backpack") local StarterGear = player:WaitForChild("StarterGear") Clone.Parent = Backpack Clone2.Parent = StarterGear end end)
If player got the gamepass should give him the tool into the backpack and startergear.
The BadgeService is used to award a player a badge or to check if a player has a badge. It does not check if a player has a Game Pass or not.
In order to check if a player has a Game Pass, you use the MarketplaceService. Instead of using UserHasBadge, you would use PlayerOwnsAsset. An alternative way is to use the GamePassService along with PlayerHasPass, although this is not recommended because PlayerHasPass caches the result of the function so the player won't get the tool if they buy the tool in-game.
tool = game.ReplicatedStorage.Tool game.Players.PlayerAdded:connect(function(player) local allow = game:GetService('MarketplaceService'):PlayerOwnsAsset(player, 289963623) --We use the MarketplaceService and PlayerOwnsAsset here instead of BadgeService and UserHasBadge if allow then local Clone = tool:Clone() local Clone2 = tool:Clone() local Backpack = player:WaitForChild("Backpack") local StarterGear = player:WaitForChild("StarterGear") Clone.Parent = Backpack Clone2.Parent = StarterGear end end)