help pls

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

skanto123

Active Member
Jan 8, 2018
70
0
0
command /power:
aliases: /powerbuy
permission: permission.power
permission message: &cNo Permission!
trigger:
wait 2 tick
message "&7&m---------------------------"
message ""
message "&7Opening &aPower Menu"
message ""
message "&7&m---------------------------"
open chest with 5 rows named "&a&l Power" to player
format slot 10 of player with emerald named "&7+ &a5 Extra Faction Power" with lore "&7$&a500,000||&aWhen purchased you will recieve 5 extra /f power!" to close then run [make console execute command "eco take %player% 500000"]->[make console execute command "f powerboost p %player% 5"]

If the player dosnt have them money he can still buy the extra power boost can someone help? I want to make it so if a player dosnt have the 500k that he cannot buy the power boost
 
you need to run a check of the players balance and stop it if the condition of them not having enough is true. It'd work better in Tuske gui as well, you have easier control over it.
code_language.skript:
create gui with virtual chest with size 5 named "&a&l Power":
    make gui slot 10 with emerald named "&7+ &a5 Extra Faction Power" with lore "&7$&a500,000||&aWhen purchased you will recieve 5 extra /f power!":
        If player's balance < 500000:
            send "Not enough money"
            stop
        else:
            execute console command "eco take %player% 500000"
            execute console command "f powerboost p %player% 5"   
    open last gui to player
 
Status
Not open for further replies.