execute store result score x motion_calc run data get entity @s Pos[0] 1000
execute store result score y motion_calc run data get entity @s Pos[1] 1000
execute store result score z motion_calc run data get entity @s Pos[2] 1000

execute store result score dx motion_calc run data get entity @p[gamemode=!spectator] Pos[0] 1000
execute store result score dy motion_calc run data get entity @p[gamemode=!spectator] Pos[1] 1000
execute store result score dz motion_calc run data get entity @p[gamemode=!spectator] Pos[2] 1000

scoreboard players set gravity motion_calc 1000

scoreboard players operation dx motion_calc -= x motion_calc
scoreboard players operation dy motion_calc += gravity motion_calc
scoreboard players operation dy motion_calc -= y motion_calc
scoreboard players operation dz motion_calc -= z motion_calc

execute store result entity @s Motion[0] double 0.00022 run scoreboard players get dx motion_calc
execute store result entity @s Motion[1] double 0.0002 run scoreboard players get dy motion_calc
execute store result entity @s Motion[2] double 0.00022 run scoreboard players get dz motion_calc

playsound custom.frog.ambient hostile @a ~ ~ ~ 1 .7

tag @s remove attacking
tag @s remove jump
