Jump to content

Need help with Gui skripting with kits


youMADison

Recommended Posts

I am building a kit pvp server and i watched the video of trent on how you skript a GUI and i have done so, added the item and everything, I would like to make it so that when a player clicks on the item, it removes items from their inventory, and gives them the item/ kit, i want it to go based off of 

command /kitui:
    trigger:
        open virtual chest inventory with size 1 named "Kit" to player
        format gui slot 4 of player with paper named "&bStarter Kit"  to run:
            
            so its easier for me to understand.

Link to comment
Share on other sites

You can use clear player's inventory to clear their items. Then give them the kit contents using give player diamond sword or what ever items you want to give them. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

I was able to resolve this issue on my own and add another:

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!"

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...