Literally just coded it on my phone probs won't work tbh
gameevent.Listen( "player_hurt" )
hook.Add( "player_hurt", "", function(stuff)
local attacker = Player(stuff.attacker)
local hurt = Player(stuff.userid)
if hurt == LocalPlayer() then
LocalPlayer():ConCommand("say "..attacker:Nick().." is attacking me!")
end
end)