#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

scoreboard players add $berries main 1
data merge block 21 151 -35 {Text2:'{"translate":"berries.name"}',GlowingText:1,Text3:'{"score":{"name":"$berries","objective":"main"},"color":"dark_red"}'}
tag @e[tag=berry,limit=1,sort=random,tag=!fruit] add fruit
tag @s remove fruit
execute at @e[tag=fruit] run setblock ~ ~ ~ minecraft:sweet_berry_bush[age=2]