execute as @e[type=#arrows,tag=bouncearrow] store result score @s xbounce run data get entity @s Motion[0] 900
execute as @e[type=#arrows,tag=bouncearrow] store result score @s ybounce run data get entity @s Motion[1] 900
execute as @e[type=#arrows,tag=bouncearrow] store result score @s zbounce run data get entity @s Motion[2] 900
execute as @e[type=#arrows,tag=bouncearrow] at @s unless block ~-.4 ~ ~ #survivalplus:nobounce store result entity @s Motion[0] double 0.001 run scoreboard players operation @s xbounce *= #-1 bounce
execute as @e[type=#arrows,tag=bouncearrow] at @s unless block ~.4 ~ ~ #survivalplus:nobounce store result entity @s Motion[0] double 0.001 run scoreboard players operation @s xbounce *= #-1 bounce
execute as @e[type=#arrows,tag=bouncearrow] at @s unless block ~ ~ ~-.4 #survivalplus:nobounce store result entity @s Motion[2] double 0.001 run scoreboard players operation @s zbounce *= #-1 bounce
execute as @e[type=#arrows,tag=bouncearrow] at @s unless block ~ ~ ~.4 #survivalplus:nobounce store result entity @s Motion[2] double 0.001 run scoreboard players operation @s zbounce *= #-1 bounce
execute as @e[type=#arrows,tag=bouncearrow] at @s unless block ~ ~-.4 ~ #survivalplus:nobounce store result entity @s Motion[1] double 0.001 run scoreboard players operation @s ybounce *= #-1 bounce
execute as @e[type=#arrows,tag=bouncearrow] at @s unless block ~ ~.4 ~ #survivalplus:nobounce store result entity @s Motion[1] double 0.001 run scoreboard players operation @s ybounce *= #-1 bounce
execute at @e[type=#arrows,tag=bouncearrow,nbt=!{inGround:1b}] run particle item{item:slime_block} ~ ~ ~ 0 0 0 0 1 force
execute at @e[type=#arrows,tag=bouncearrow,nbt=!{inGround:1b}] run particle firework ~ ~ ~ 0 0 0 0 1 force
execute as @e[tag=bouncearrow] run data merge entity @s {SoundEvent:"minecraft:block.slime_block.break"}
execute as @e[type=#arrows,tag=bouncearrow] run scoreboard players add @s bounce 1
execute as @e[type=#arrows,tag=bouncearrow,scores={bounce=..200},nbt={inGround:1b}] run data modify entity @s damage set value 6
execute as @e[type=#arrows,tag=bouncearrow,scores={bounce=..200}] run data modify entity @s inGround set value 0b
execute as @e[type=#arrows,tag=bouncearrow,scores={bounce=200..}] run tag @s remove specialarrow
execute as @e[type=#arrows,tag=bouncearrow,scores={bounce=200..}] run tag @s remove bouncearrow