

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

execute as @s[tag=!KyuMagnetLaunch] run execute store result score @s PosXTemp run data get entity @p[gamemode=!spectator] Pos[0]
execute as @s[tag=!KyuMagnetLaunch] run execute store result score @s PosYTemp run data get entity @p[gamemode=!spectator] Pos[1]
execute as @s[tag=!KyuMagnetLaunch] run execute store result score @s PosZTemp run data get entity @p[gamemode=!spectator] Pos[2]

execute as @s[tag=!KyuMagnetLaunch] run scoreboard players operation @s PosXTemp -= @s PosX
execute as @s[tag=!KyuMagnetLaunch] run scoreboard players operation @s PosYTemp -= @s PosY
execute as @s[tag=!KyuMagnetLaunch] run scoreboard players operation @s PosZTemp -= @s PosZ

execute as @s[tag=!KyuMagnetLaunch] run execute store result entity @s Motion[0] double 0.07 run scoreboard players get @s PosXTemp
execute as @s[tag=!KyuMagnetLaunch] run execute store result entity @s Motion[1] double 0.0375 run scoreboard players get @s PosYTemp
execute as @s[tag=!KyuMagnetLaunch] run execute store result entity @s Motion[2] double 0.07 run scoreboard players get @s PosZTemp

data merge entity @s[type=item] {NoGravity:1}

tag @s add KyuMagnetLaunch


