
scoreboard players operation $temp main = @s pumpkins
function f:data/stats/score
scoreboard players add @s temp 500
scoreboard players add @s temp2 600

#Limit
scoreboard players set @s[scores={pumpkins=9999..}] temp 599
scoreboard players set @s[scores={pumpkins=9999..}] temp2 699

#Items
execute store result block 314 103 -335 Items[0].tag.CustomModelData int 1 run scoreboard players get @s temp
item replace entity @s inventory.5 from block 314 103 -335 container.0

execute store result block 314 103 -335 Items[0].tag.CustomModelData int 1 run scoreboard players get @s temp2
item replace entity @s[scores={pumpkins=100..}] inventory.6 from block 314 103 -335 container.0
item replace entity @s[scores={pumpkins=..99}] inventory.6 with lime_dye{CustomModelData:70,display:{Name:'""'},Stats:1}