###Checks for the time of day and adds requisite scores at noon###
scoreboard players add @s[tag=nitDenizen] nitTaxSpawn 1
scoreboard players add @s[tag=nitBasalter] nitResourceSpawn 1
scoreboard players add @s[tag=nitShroomer] nitResourceSpawn 1

###Performs item distribution###
execute if entity @s[tag=nitDenizen,scores={nitTaxSpawn=1..}] at @e[tag=nitCGoldStor,limit=1,sort=nearest] run summon minecraft:item ~ ~0.5 ~ {Item:{id:"minecraft:gold_ingot",Count:4b}}
execute if entity @s[scores={nitResourceSpawn=1..},tag=nitBasalter] at @e[tag=nitNetherbrickStor,limit=1,sort=nearest] run summon minecraft:item ~ ~0.5 ~ {Item:{id:"minecraft:nether_brick",Count:12b}}
execute if entity @s[scores={nitResourceSpawn=1..},tag=nitShroomer] at @e[tag=nitNetherbrickStor,limit=1,sort=nearest] run summon minecraft:item ~ ~0.5 ~ {Item:{id:"minecraft:nether_brick",Count:4b}}

###Decrements scores###
scoreboard players remove @s[tag=nitDenizen,scores={nitTaxSpawn=1..}] nitTaxSpawn 1
scoreboard players remove @s[tag=nitBasalter,scores={nitResourceSpawn=1..}] nitResourceSpawn 1
scoreboard players remove @s[tag=nitShroomer,scores={nitResourceSpawn=1..}] nitResourceSpawn 1