# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- # effects execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] run playsound minecraft:entity.generic.explode record @a ~ ~ ~ 1 1 1 execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] run particle minecraft:explosion ~ ~1 ~ 0 0 0 1 2 normal # reset player execute in herohost:world run tp @a[tag=!hc.debug,nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] ~ ~ ~ clear @a[tag=!hc.debug,nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] minecraft:tnt # start explosion timer execute store result storage hc.tnt tt_timer int 1 run random value 25..35 $schedule function herohost:tnt/explosion $(tt_timer)s # tag next schedule function herohost:tnt/schedule/tag 3s summon minecraft:block_display 5 101 -245 {block_state:{Name:"minecraft:scaffolding"}}