execute store result score @s enemy_x run data get entity @s Pos[0] 1000
execute store result score @s enemy_y run data get entity @s Pos[1] 1000
execute store result score @s enemy_z run data get entity @s Pos[2] 1000

summon marker ~ ~ ~ {Tags:["throw_aim"]}

tp @e[type=marker,tag=throw_aim] ^ ^ ^0.1

execute store result score @s target_x run data get entity @n[type=marker,tag=throw_aim] Pos[0] 1000
execute store result score @s target_y run data get entity @n[type=marker,tag=throw_aim] Pos[1] 1000
execute store result score @s target_z run data get entity @n[type=marker,tag=throw_aim] Pos[2] 1000

execute store result entity @s Motion[0] double 0.015 run scoreboard players operation @s target_x -= @s enemy_x
execute store result entity @s Motion[1] double 0.015 run scoreboard players operation @s target_y -= @s enemy_y
execute store result entity @s Motion[2] double 0.015 run scoreboard players operation @s target_z -= @s enemy_z

kill @n[type=marker,tag=throw_aim]
tag @s add thrown_player