Help with lifesteal game

How would I make it so when you get a kill your max health gets increased by one.

local players = game.Players

players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char) 
         local humanoid = char:WaitForChild("Humanoid")

          humanoid.Died:Connect(function()
           local creator = humanoid:WaitForChild("creator").Value

           if creator.Character then
                creator.Character.Humanoid.MaxHealth += 1
           end
       end)
    end)
end)

this should be it. I wrote this in my head.

Wow if you did that in your head thats impresive. Where should I put this? THX

server script service

Summary

This text will be hidden

Would this work when killing dummy like zombies or only players?

I dont think the script work I tried it using an alt account. Could you make it so when you get a kill your maxhealth goes up and you go to full health? THX