
scoreboard players add @e[type=silverfish,tag=jjc_copperfish1] jjc_404 1
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1}] at @s run playsound minecraft:item.axe.scrape hostile @a[distance=..200] ~ ~1 ~ 3 0
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1}] at @s run playsound minecraft:item.axe.scrape hostile @a[distance=..200] ~ ~1 ~ 3 0
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1}] at @s run playsound minecraft:block.copper_bulb.turn_on hostile @a[distance=..200] ~ ~1 ~ 3 1
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1}] at @s run playsound minecraft:block.copper_bulb.turn_on hostile @a[distance=..200] ~ ~1 ~ 3 1
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1}] at @s run particle dust{color:[1,0,0],scale:1} ~ ~1 ~ 1 1 1 0 100 force

execute as @e[type=silverfish,tag=jjc_copperfish1,predicate=colosseum_of_fools:ss/speed0_xz_any,scores={jjc_404=21..}] at @s run playsound item.mace.smash_ground_heavy hostile @a[distance=..200] ~ ~1 ~ 1.5 1
execute as @e[type=silverfish,tag=jjc_copperfish1,predicate=colosseum_of_fools:ss/speed0_xz_any,scores={jjc_404=21..}] at @s run particle explosion_emitter
scoreboard players add @e[type=silverfish,tag=jjc_copperfish1,predicate=colosseum_of_fools:ss/speed0_xz_any,scores={jjc_404=21..}] jjc_404 10000

execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1}] at @s run summon marker ~ ~ ~ {Tags:["jjc_copperfish1_m","jjc"]}
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s store result score @s jjc_x1 run data get entity @s Pos[0] 1000
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s store result score @s jjc_z1 run data get entity @s Pos[2] 1000
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s facing entity @p[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..60] feet run tp @s ~ ~ ~ ~ 0
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s run tp @s ^ ^ ^0.05
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s store result score @n[distance=..200,type=silverfish,tag=jjc_copperfish1] jjc_x2 run data get entity @s Pos[0] 1000
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s store result score @n[distance=..200,type=silverfish,tag=jjc_copperfish1] jjc_z2 run data get entity @s Pos[2] 1000
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s run scoreboard players operation @n[distance=..200,type=silverfish,tag=jjc_copperfish1] jjc_x2 -= @s jjc_x1
execute as @e[type=marker,tag=jjc_copperfish1_m] at @s run scoreboard players operation @n[distance=..200,type=silverfish,tag=jjc_copperfish1] jjc_z2 -= @s jjc_z1
kill @e[type=marker,tag=jjc_copperfish1_m]

execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1..20}] at @s store result entity @s Motion[0] double -0.002 run scoreboard players get @s jjc_x2
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=1..20}] at @s store result entity @s Motion[2] double -0.002 run scoreboard players get @s jjc_z2

execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=21}] at @s run playsound entity.minecart.riding master @a[distance=..200] ~ ~1 ~ 1 1
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=21..}] at @s store result entity @s Motion[0] double 0.03 run scoreboard players get @s jjc_x2
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=21..}] at @s store result entity @s Motion[2] double 0.03 run scoreboard players get @s jjc_z2
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=21..}] at @s as @e[nbt={attributes:[{}]},distance=..3,type=!silverfish,tag=!jjc_copperfish_tamer] at @s run function colosseum_of_fools:ss/copperfish/1d
execute as @e[type=silverfish,tag=jjc_copperfish1,scores={jjc_404=21..}] at @s run particle firework ~ ~1 ~ 0.25 0.25 0.25 0.1 5 normal

tag @e[type=silverfish,tag=jjc_copperfish,tag=jjc_copperfish1,scores={jjc_404=100..}] add jjc_copperfish1_r
scoreboard players reset @e[type=silverfish,tag=jjc_copperfish1_r] jjc_404
tag @e[type=silverfish,tag=jjc_copperfish1_r] remove jjc_copperfish1
tag @e[type=silverfish,tag=jjc_copperfish1_r] remove jjc_copperfish1_r