scoreboard players add @s timer 1
execute at @s[nbt={inGround:0b,crit:0b}] run particle dust{color:[1,1,1],scale:1} ~ ~ ~ 0 0 0 0 1 force
execute at @s[nbt={inGround:0b,crit:1b}] run particle crit ~ ~ ~ 0 0 0 0 1 force

data merge entity @s[tag=fastarrow] {NoGravity:1b,crit:0b}
execute as @s[tag=fastarrow] run function survivalplus:tools/archer/arrow/speedup
data merge entity @s[scores={timer=3}] {NoGravity:0b,crit:0b}

execute as @s store result score @s burst run data get entity @s damage

scoreboard players add @s[scores={timer=5}] burst 3
scoreboard players add @s[scores={timer=10}] burst 3
scoreboard players add @s[scores={timer=15}] burst 3
scoreboard players add @s[scores={timer=20}] burst 3
scoreboard players add @s[scores={timer=25}] burst 3
data merge entity @s[scores={timer=30}] {crit:1b}

execute store result entity @s damage int 1 run scoreboard players get @s burst

execute if block ~ ~ ~ water run data merge entity @s {damage:1,crit:0b,NoGravity:0b}
execute if block ~ ~ ~ water run tag @s remove longarrow
data merge entity @s[nbt={inGround:1b}] {damage:1,crit:0b,NoGravity:0b}
tag @s[nbt={inGround:1b}] remove specialarrow
tag @s[nbt={inGround:1b}] remove longarrow