on load:
set {items::was} to glowing stick named "&cᴡʜᴀᴄᴋ ᴀ ѕᴛɪᴄᴋ" with lore "&8ᴡᴇᴀᴘᴏɴ" and " " and "&7Whack a player afar"
set {items::sugar} to glowing sugar named "&fѕᴘᴇᴇᴅ ѕᴜɢᴀʀ" with lore "&8ᴘᴏᴡᴇʀ ᴜᴘ" and " " and "&7Gain a temporary speed boost"
set {items::tnt} to 5 of glowing tnt named "&cɪɴѕᴛᴀɴᴛ ᴛɴᴛ" with lore "&8ᴡᴇᴀᴘᴏɴ" and " " and "&7TNT that will instantly explode"
if player's held item is {items::tnt}:
remove 1 of player's held item from player's held item
set event-block to air
spawn primed tnt at event-location with nbt from "{Fuse:20}"
For some reason it only works if its exactly 5 pieces of tnt. Im sure its something simple im overlooking, but any help? 😅