How to create an "impact grenade" in Minecraft 1.13?
Solution 1:
You're in luck, because I have a function that does exactly this. I'll explain what it does then give you the commands. I'm not sure eggs are a good idea, though, because there is a chance a baby chicken could spawn.
First, a scoreboard objective is created that tracks players who have thrown eggs. Players who have thrown an egg and have held an egg (determined by tag commands at the end of the function) summons an armor stand at the closest egg without a certain tag, then tags the egg so it doesn't happen again. The armor stand is constantly teleported to the closest egg, but when it does not detect a nearby egg then it is tagged. You can then execute all armor stands who have that tag to summon creepers or whatever you want to happen, then kill the armor stand.
This is the function. I converted it into 1.13 because it was originally in 1.12, and I changed it from snowballs to eggs (named "Grenade"). Because of lack of time I haven't tested it, but I see no reason why it shouldn't work. If it doesn't work, just let me know.
scoreboard objectives add grenade minecraft.used:minecraft.egg
execute as @a[scores={grenade=1..},tag=grenade] at @e[sort=nearest,limit=1,type=egg,tag=!grenade] run summon armor_stand ~ ~ ~ {Small:1b,NoGravity:1b,CustomName:"\"grenade\"",Marker:1b,Invisible:1b}
execute as @e[type=egg,tag=grenade] at @s run tp @e[type=armor_stand,name=grenade,limit=1,sort=nearest,distance=..2] @s
tag @e[type=armor_stand,name=grenade] add boom
execute as @e[type=egg,tag=grenade] at @s run tag @e[type=armor_stand,name=grenade,limit=1,sort=nearest] remove boom
execute as @e[type=armor_stand,tag=boom] at @s run summon creeper ~ ~ ~ {Fuse:0.0b,CustomName:"\"a grenade\""}
kill @e[type=armor_stand,tag=boom]
scoreboard players reset @a grenade
tag @a remove grenade
tag @a[nbt={SelectedItem:{id:"minecraft:egg",tag:{display:{Name:"\"Grenade\""}}}}] add grenade