kills = game.Workspace.LeaderboardV3.leaderstats.KOs script.Parent.ClickDetector.MouseClick:connect(function(Buy) if kills >= 0 then for i,v in pairs(game.Players:GetChildren()) do if v.Backpack ~= nil then clone2 = game.Lighting.Venomshank:Clone() clone2.Parent = v.Backpack end end end end)
This is what you did wrong: in the first line you defined kills as the leaderstat in the player. So you are basically saying that if the leaderstat kills = 0 then you get it. You get the sword. You want to define the value. So then you will be saying if the player has 0 kills then buy the sword.
kills = game.Workspace.LeaderboardV3.leaderstats.KOs.Value
So this would be the script:
kills = game.Workspace.LeaderboardV3.leaderstats.KOs.Value script.Parent.ClickDetector.MouseClick:connect(function(Buy) if kills >= 0 then for i,v in pairs(game.Players:GetChildren()) do if v.Backpack ~= nil then clone2 = game.Lighting.Venomshank:Clone() clone2.Parent = v.Backpack end end end end)