kill @e[type=minecraft:marker,tag=flashy,sort=nearest,limit=1]
execute at @s run playsound minecraft:entity.tnt.primed ambient @a ~ ~ ~


execute store result score .random random run random value 1..3
execute if score .random random = .1 random run scoreboard players set .flash random 10
execute if score .random random = .2 random run scoreboard players set .flash random 15
execute if score .random random = .3 random run scoreboard players set .flash random 20

execute at @s run summon minecraft:item_display ~ ~0.5 ~ {Tags:["flash"],item:{id:"minecraft:splash_potion",components:{"minecraft:custom_model_data":{floats:[1001.0f]}},count:1},billboard:"vertical"}
execute at @s run scoreboard players operation @e[type=minecraft:item_display,tag=flash,tag=!flashy,sort=nearest,limit=1] timer = .flash random
tag @e[type=minecraft:item_display,tag=flash,tag=!flashy,sort=nearest,limit=1] add flashy