execute if entity @e[type=marker,tag=milk] run return run summon item ~ ~ ~ {Motion:[0.0,0.6,0.0],Tags:["lucky_block_item","new"],Item:{id:"minecraft:bread",count:4,components:{"minecraft:item_name":{"color":"gray","text":"Bread"}}},CustomName:'[{"color":"red","text":"Red Light "},{"color":"green","text":"Green Light"}]'}
execute if entity @e[type=marker,tag=rlgl] run return run summon item ~ ~ ~ {Motion:[0.0,0.6,0.0],Tags:["lucky_block_item","new"],Item:{id:"minecraft:bread",count:4,components:{"minecraft:item_name":{"color":"gray","text":"Bread"}}},CustomName:'[{"color":"red","text":"Red Light "},{"color":"green","text":"Green Light"}]'}

tag @s add temp
execute as @a[distance=..250,gamemode=!spectator,limit=12,sort=random,tag=!temp] at @s run summon cow ~ ~ ~ {DeathLootTable:"none",Health:1000f,Motion:[0.0,0.7,0.0],active_effects:[{id:"minecraft:poison",amplifier:0,duration:640,show_particles:0b},{id:"minecraft:glowing",amplifier:0,duration:640,show_particles:0b}],attributes:[{id:"minecraft:armor",base:20},{id:"minecraft:knockback_resistance",base:1},{id:"minecraft:max_health",base:1000},{id:"minecraft:movement_speed",base:0.2},{id:"minecraft:scale",base:0.55},{id:"minecraft:step_height",base:1}]}
tag @s remove temp

scoreboard players set @a[distance=..250] drank_milk 0

summon cow ~ ~ ~ {DeathLootTable:"none",Health:1000f,Motion:[0.0,0.7,0.0],active_effects:[{id:"minecraft:poison",amplifier:0,duration:640,show_particles:0b},{id:"minecraft:glowing",amplifier:0,duration:640,show_particles:0b}],attributes:[{id:"minecraft:armor",base:20},{id:"minecraft:knockback_resistance",base:1},{id:"minecraft:max_health",base:1000},{id:"minecraft:movement_speed",base:0.2},{id:"minecraft:scale",base:0.55},{id:"minecraft:step_height",base:1}]}

execute at @n[type=marker,tag=map_center] run summon marker ~ 120 ~ {Tags:["milk","new"],CustomName:'"milk_marker"'}
execute as @n[type=marker,tag=milk,tag=new] at @s run function pctf:logic/items/lucky_block/outcomes/global/milk/init
give @a[distance=..250,gamemode=!spectator] bucket