particle dust{color:[1,0,0],scale:1} ^ ^ ^-.25 0 0 0 0 1 force
particle dust{color:[1,0,0],scale:1} ~ ~ ~ 0 0 0 0 1 force
particle dust{color:[1,0,0],scale:1} ^ ^ ^.25 0 0 0 0 1 force

execute if entity @e[dx=0,tag=!sentry] positioned ~-0.99 ~-0.99 ~-0.99 if entity @e[dx=0,tag=!sentry] run tag @s add hittarget
execute if entity @e[dx=0,tag=!sentry] positioned ~-0.99 ~-0.99 ~-0.99 if entity @e[dx=0,tag=!sentry] run playsound minecraft:entity.arrow.hit neutral @a ~ ~ ~

execute if entity @s[tag=sentry,tag=!snipsen] as @a[dx=0] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 7 arrow by @n[tag=sentry,tag=!snipsen]
execute if entity @s[tag=sentry,tag=!snipsen] as @e[dx=0,type=!#survivalplus:notalive,type=!player] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 10 arrow by @n[tag=sentry,tag=!snipsen]
execute if entity @s[tag=snipsen] as @a[dx=0] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 17 arrow by @n[tag=snipsen]
execute if entity @s[tag=snipsen] as @e[dx=0,type=!#survivalplus:notalive,type=!player] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 25 arrow by @n[tag=snipsen]

execute if entity @s[predicate=survivalplus:coldfeet] as @e[dx=0,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run effect give @s slowness 5

execute if entity @s[tag=sentry,tag=!snipsen,distance=..14,tag=!hittarget] if block ~ ~ ~ #survivalplus:nobounce positioned ^ ^ ^.5 run function survivalplus:tools/trap/sentrytarget
execute if entity @s[tag=snipsen,distance=..40,tag=!hittarget] if block ~ ~ ~ #survivalplus:nobounce positioned ^ ^ ^.5 run function survivalplus:tools/trap/sentrytarget
tag @s remove hittarget