Advertisement
facedwarrior193

Kills and Deaths

Mar 17th, 2022
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. game.Players.PlayerAdded:Connect(function(plr)
  2.     plr.CharacterAdded:Connect(function(char)
  3.         local humanoid = char:FindFirstChild("Humanoid")
  4.         humanoid.Died:Connect(function()
  5.             plr.leaderstats.Deaths.Value += 1
  6.             local tag = humanoid:FindFirstChild("creator")
  7.             local killer = tag.Value
  8.             if tag and killer then
  9.                 killer.leaderstats:FindFirstChild("Kills").Value += 1
  10.             end
  11.         end)
  12.        
  13.     end)
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement