tag @s add nitroglycerin_coated
particle dust{color:[0.902,0.882,0.620],scale:1} ~ ~1 ~ 0.5 0.7 0.5 1 50 normal
particle falling_dust{block_state:"yellow_carpet"} ~ ~1 ~ 0.5 0.7 0.5 1 15 normal
playsound minecraft:block.beehive.drip player @a[distance=..12] ~ ~ ~ 10 1.7

tellraw @p[nbt={Inventory:[{id:"minecraft:gunpowder",components:{"minecraft:custom_data":{nitroglycerin:1b}}}]},tag=nitroglycerin_random,limit=1,sort=nearest] [{"text": "[Nitroglycerin] ","color": "#dce5a8"},{"text": "Coated a nearby ","color": "gray"},{"selector": "@s","color": "red"},{"text": " in nitroglycerin!","color": "gray"}]