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

#Berries
execute if score timer click matches 1 unless entity @e[tag=berry] run function f:game/game_type/hide_and_seek/berry_spawn
execute as @e[tag=fruit] at @s if block ~ ~ ~ minecraft:sweet_berry_bush[age=1] run function f:game/game_type/hide_and_seek/berry

#Hiders count
scoreboard players set $core chest 0
execute store result score $core chest if entity @a[team=hider]
execute unless score $core chest = $core click run function f:game/game_type/hide_and_seek/hiders
scoreboard players operation $core click = $core chest