scoreboard players set @s carrotstick 0
scoreboard players set @s sneak 0
item replace entity @s[gamemode=!creative] weapon.mainhand with minecraft:air
particle minecraft:end_rod ~ ~1 ~ 1 1 1 0 10 normal
scoreboard players set @s timer 400
execute as @a[tag=!ride,scores={sneak=1..}] run scoreboard players set @s sneak 0
summon minecraft:chicken ~ ~ ~ {Tags:["ride"],Team:"ride",Invulnerable:1b}
summon minecraft:wandering_trader ~ ~ ~ {Silent:1b,Invulnerable:1b,Team:"ride",Tags:["ride"],Offers:{},HandItems:[{id:"minecraft:air",count:1},{}],attributes:[{id:"minecraft:scale",base:0.8d}]}
summon minecraft:marker ~ ~ ~ {Tags:["ride"],Team:"ride"}
tag @e[type=minecraft:chicken,sort=nearest,limit=1] add new
tag @e[type=minecraft:wandering_trader,sort=nearest,limit=1] add new
tag @e[type=minecraft:marker,sort=nearest,limit=1] add new
tag @s add ride
tag @s add new
scoreboard players reset @s howmanychickens
scoreboard players add .chickencount howmanychickens 1
scoreboard players operation @e[type=minecraft:chicken,tag=new] howmanychickens = .chickencount howmanychickens
scoreboard players operation @e[type=minecraft:wandering_trader,tag=new] howmanychickens = .chickencount howmanychickens
scoreboard players operation @e[type=minecraft:marker,tag=new] howmanychickens = .chickencount howmanychickens
scoreboard players operation @e[type=minecraft:player,tag=new] howmanychickens = .chickencount howmanychickens
tag @e remove new
attribute @e[type=minecraft:chicken,sort=nearest,limit=1] minecraft:scale base set 2
ride @s mount @e[type=minecraft:chicken,sort=nearest,limit=1]