Shop Gui Permission help!

  • 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 comminuty!

    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.

andreas10550

Member
Feb 23, 2020
1
0
0
29
Hey. I need help for my skript to work. It is a gui where u can buy kits, but i can't seem to make it work.

Can u guys help me??

(I am new to skript, so please be gentle)
 

Attachments

  • kitbuy.sk
    5.1 KB · Views: 266
I recommend using TuSKe GUIs, but I'll be gentle with you. I'll rewrite your code in TuSKe if you'd like! (please say you want it in TuSKe ive already rewrote it and it is 4x shorter and i spent a half hour rewriting it) Also, do you use LuckPerms, GroupManager or Pex?
assuming you have pex:
requires tuske
Code:
command /kitbuy:
    trigger:
        wait 3 ticks
        open virtual chest with 3 rows named "&3&lFantasi&d&lland" to player
        format gui slot (numbers between 0 and 26) of player with cyan stained glass pane named "&3Fantasi&dland" to do nothing
        format gui slot 11 of player with chest named "&8Normal Kits" with lore "&3You can buy normal kits here!" to run:
            close player's inventory
            open virtual chest with 3 rows named "&8Normal Kits" to player
            format gui slot 0 of player with paper named "&9/kit Pyroman" with lore "&3Price: 5000 Coins" to run:
                if player's balance >= 5000:
                    execute console command "pex user %player% add essentials.kits.pyroman"
                    remove 5000 from player's balance
                    send "&aYou bought the Pyroman kit!"
                    close player's inventory
                else:
                    send "&cYou do not have enough permission!"
                    close player's inventory
        format gui slot 15 of player with chest named "&dDonation Kits" with lore "&3You can buy donator kits here!" to run:
            close player's inventory
            open virtual chest with 3 rows named "&8Donation Kits" to player
            format gui slot 0 of player with paper named "&9/kit Pyroman" with lore "&3Price: 5000 Coins" to do nothing
 
Status
Not open for further replies.