$execute unless score @s coins matches $(speed_potion).. run return run tellraw @s {"text":"You don't have enough coins! ($(speed_potion)c)","color":"red"}
give @s potion[custom_name={"color":"yellow","italic":false,"text":"Speed Potion"},lore=[{"color":"dark_aqua","italic":false,"text":"Speed II - 45s"}],tooltip_display={hidden_components:["potion_contents"]},potion_contents={custom_color:30719,custom_effects:[{id:"minecraft:speed",amplifier:1,duration:600,show_particles:1b,show_icon:1b}]}] 1
$function pctf:logic/player/coins/remove {amount: "$(speed_potion)"}