I want to add that if the guy who is attacking me is in my party it won't close the client

Is it possible to this script?

Happy weekend and thanks!

Code:
BattleMessageProxy.OnReceive('pk_message', function(proxy, message)
damage, creature = string.match(message, 'You lose (%d+) %a+ due to an attack by (.+).')
if Creature.New(creature):isPlayer() then
Self.Say("utamo vita")
wait(300,500)
os.exit()
end
end)