#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#Close
scoreboard players add @s buy 1
execute if score @s buy matches 101 run function f:game/store/gui
execute if score @s buy matches 101 run particle minecraft:cloud ~ ~1 ~ 0.5 0.3 0.5 0.5 100 force @s
execute if score @s buy matches 101 run tp @s ~ ~10.3 ~
execute if score @s buy matches 101 run effect give @s invisibility 1 0 true
execute if score @s buy matches 101 run effect give @s minecraft:levitation 1 255 true
execute if score @s buy matches 101 run effect give @s minecraft:blindness 1 1 true
execute if score @s buy matches 101 run playsound minecraft:block.wooden_door.close master @s ~ ~ ~ 300
execute if score @s buy matches 103 run tp @s ~ ~-10 ~
execute if score @s buy matches 104 run effect clear @s levitation
execute if score @s buy matches 105 run effect clear @s invisibility
execute if score @s buy matches 106.. run scoreboard players set @s buy 0
