execute at @s run tp @s ^ ^ ^1

execute as @s run execute store result score @s PosX run data get entity @s Pos[0] 100
execute as @s run execute store result score @s PosY run data get entity @s Pos[1] 100
execute as @s run execute store result score @s PosZ run data get entity @s Pos[2] 100


execute as @s run execute store result score @s PosXTemp run data get entity @p[tag=KineticKnock] Pos[0] 100
execute as @s run execute store result score @s PosYTemp run data get entity @p[tag=KineticKnock] Pos[1] 100
execute as @s run execute store result score @s PosZTemp run data get entity @p[tag=KineticKnock] Pos[2] 100

execute as @s run scoreboard players operation @s PosXTemp -= @s PosX
execute as @s run scoreboard players operation @s PosYTemp -= @s PosY
execute as @s run scoreboard players operation @s PosZTemp -= @s PosZ

scoreboard players set @s KyuDummy 1000
scoreboard players operation @s KyuDummy += @p[tag=KineticKnock] KyuFall

#tellraw @a ["",{"score":{"name":"@s","objective":"PosXTemp"}},{"text":" and  "},{"score":{"name":"@s","objective":"PosZTemp"}},{"text":"..... "},{"score":{"name":"@s","objective":"PosZ"}},{"text":"z"}]


execute as @s run scoreboard players operation @s PosXTemp *= @s KyuDummy
execute as @s run scoreboard players operation @s PosZTemp *= @s KyuDummy

#tellraw @a ["",{"score":{"name":"@s","objective":"PosXTemp"}},{"text":" and  "},{"score":{"name":"@s","objective":"PosZTemp"}},{"text":"..... "},{"score":{"name":"@s","objective":"PosZ"}},{"text":"z"}]


scoreboard players remove @s[scores={PosYTemp=-20..}] PosYTemp 20

scoreboard players set @s[scores={PosXTemp=714000..}] PosXTemp 714000
scoreboard players set @s[scores={PosZTemp=714000..}] PosZTemp 714000

scoreboard players set @s[scores={PosXTemp=..-714000}] PosXTemp -714000
scoreboard players set @s[scores={PosZTemp=..-714000}] PosZTemp -714000

execute store result entity @e[type=#suhc:hostiles,tag=MobbyBack,limit=1,sort=nearest] Motion[0] double -0.000014 run scoreboard players get @s PosXTemp
execute store result entity @e[type=#suhc:hostiles,tag=MobbyBack,limit=1,sort=nearest] Motion[1] double -0.015 run scoreboard players get @s PosYTemp
execute store result entity @e[type=#suhc:hostiles,tag=MobbyBack,limit=1,sort=nearest] Motion[2] double -0.000014 run scoreboard players get @s PosZTemp

kill @s