Jump to content

Need help with Gui skripting with kits


youMADison

Recommended Posts

command /kitui:
    permission: kitlook
    trigger:
        open virtual chest with size 1 named "KITS" to player
        format gui slot 0 of player with paper named "&bStarter Kit" to run:
            execute player command "/kit starter"
        format gui slot 1 of player with iron ingot named "&bIron Kit" to run:
            if player has 10 emeralds:
                if player has permission "ironkit":
                    remove 10 emerald from player's inventory
                    execute player command "/kit iron"
                    send "iron kit has been purchased, 10 emerald have been removed from your inventory"
                else:
                    send "no permission"
            else:
                send "&cYou dont have 10 emeralds!"
                format gui slot 2 of player with diamond named "&bDiamond Kit" to run:
            if player has 20 emeralds:
                if player has permission "diamondkit":
                    remove 20 emerald from player's inventory
                    execute player command "/kit diamond"
                    send "diamond kit has been purchased, 20 emerald have been removed from your inventory"
                else:
                    send "no permission"
            else:
                send "&cYou dont have 20 emeralds!"

doesent work it says there is lines of blank code that cant be executed

Link to comment
Share on other sites

It looks like you did not format the diamond kit right. I Believe I have fixed it for you if you have not already.

 

command /kitui:
    permission: kitlook
    trigger:
        open virtual chest with size 1 named "KITS" to player
        format gui slot 0 of player with paper named "&bStarter Kit" to run:
            execute player command "/kit starter"
        format gui slot 1 of player with iron ingot named "&bIron Kit" to run:
            if player has 10 emeralds:
                if player has permission "ironkit":
                    remove 10 emerald from player's inventory
                    execute player command "/kit iron"
                    send "iron kit has been purchased, 10 emerald have been removed from your inventory"
                else:
                    send "no permission"
            else:
                send "&cYou dont have 10 emeralds!"
        format gui slot 2 of player with diamond named "&bDiamond Kit" to run:
            if player has 20 emeralds:
                if player has permission "diamondkit":
                    remove 20 emerald from player's inventory
                    execute player command "/kit diamond"
                    send "diamond kit has been purchased, 20 emerald have been removed from your inventory"
                else:
                    send "no permission"
            else:
                send "&cYou dont have 20 emeralds!"

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...