Your code only checks kills on spawn. There is no detection of when a player's kills increases.
function died(ammo, killer)
-- check if zombie
local acc = getPlayerAccount(killer)
if (isGuestAccount(acc)) then return end
local zombiekills = getAccountData(acc, 'Zombie kills')
zombiekills = tonumber(zombiekills) + 1
end
addEventHandler("onPedWasted", root, died) --Add the Event when ped1 dies
Now you just need to check for levels. I would suggest moving the kills to a table, and only set the account's data when the player quits/logs out. Also, remove the same from the account data key.