Row 1
1. [impulse] /scoreboard objectives add death deathCount
2. [chain] /scoreboard objectives add creeperDeath minecraft.killed_by:minecraft.creeper
3. [chain] /gamerule show_death_messages false
Row 2
4. [repeat] /execute as @a at @s unless score @s creeperDeath matches 1 if score @s death matches 1.. unless entity @e[type=!item,type=!minecraft:experience_orb,distance=..4] run tellraw @a [{"selector":"@s"}," died from a 360"]
5. [chain] /execute as @a at @s if entity @e[type=cow,distance=..4] if score @s death matches 1.. run tellraw @a [{"selector":"@s"}," died from milking a cow..."]
6. [chain] /execute as @a at @s if score @s creeperDeath matches 1.. if score @s death matches 1.. run tellraw @a [{"selector":"@s"}," died from hugging a creeper!"]
7. [chain] /execute as @a at @s if score @s death matches 1.. run scoreboard players reset @s creeperDeath
8. [chain] /execute as @a at @s if score @s death matches 1.. run scoreboard players reset @s death