Bebedi

Untitled

Jan 14th, 2023
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. I didn't test it but I think it should work
  2.  
  3.  
  4. _G.deaths = 0
  5. local player = game.Players:FindFirstChild("PlayerName") -- Replace "PlayerName" with the actual player name
  6.  
  7. player.CharacterAdded:Connect(function(character)
  8.    local humanoid = character:WaitForChild("Humanoid")
  9.    humanoid.Died:Connect(function()
  10.        _G.deaths = _G.deaths + 1
  11.        print(player.Name .. " died for the" .. _G.deaths .. " time")
  12.    end)
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment