how to check if a player has an item in their inventory roblox code example
Example: check if player has item in inventory
/execute as @a[nbt={Inventory:[{id:"minecraft:stone"}]}] run say hi
/execute as @a[nbt={Inventory:[{id:"minecraft:stone"}]}] run say hi