Try debug.
Replace the previous script with this
function onStatsChange(cid, attacker, type, combat, value)
print(cid, attacker, type, combat, value)
if (isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS) then
print("doCreatureAddHealth(cid, -10)")
doCreatureAddHealth(cid, -10)...