$execute if entity @n[type=minecraft:happy_ghast,nbt={data:{Owner:$(UUID)}},distance=..100] run data modify storage better_happy_ghast:selected_happy_ghast players[{UUID:$(UUID)}].Selected set from entity @n[type=minecraft:happy_ghast,nbt={data:{Owner:$(UUID)}},distance=..100] UUID
$function better_happy_ghast:tick/player/happy_ghast_order_menu/select_nearest_happy_ghast/exe with storage better_happy_ghast:selected_happy_ghast players[{UUID:$(UUID)}]
$execute if score @s happy_ghast matches 2 unless entity @n[type=minecraft:happy_ghast,nbt={data:{Owner:$(UUID)}},distance=..100] run tellraw @s[scores={better_happy_ghast.player_configs.send_message=1}] "§7[§r§6§lBetter §r§7§lHappy Ghast§r§7] §cNo tamed Happy Ghast by you in a distance of 100 blocks as been found."
$execute if score @s happy_ghast matches 2 unless entity @n[type=minecraft:happy_ghast,nbt={data:{Owner:$(UUID)}},distance=..100] run playsound block.note_block.pling master @s[scores={better_happy_ghast.player_configs.play_sound=1}] ~ ~ ~ 1 0.5