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


    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need some help with a skript.

Discussion in 'Skript' started by SisterFarmer11, Jul 14, 2022.

Thread Status:
Not open for further replies.
  1. SisterFarmer11

    Jul 14, 2022
    Likes Received:
    I am trying to make a "Wallet". Where right clicking on the wallet opens a shulker box GUI. I want the skript so players can only drag gold nuggets named Gold Coins into the GUI. I can easily change textures, so if you need the Wallet item to be a shulker box, it's no problem.
  2. MiiTsY

    MiiTsY Member

    May 27, 2022
    Likes Received:
    Hey there.

    Code (Text):
    1. function wallet(p: player):
    2.     open virtual chest inventory named "Wallet" with size 3 to {_p}  #Change the name here but u will have to change the name accordingly on line 15 and 19
    3.     set {_slot} to 0
    4.     loop 26 times:  #Loading saved inventory
    5.         set slot {_slot} of current inventory of {_p} to {chest::%{_slot}%::%{_p}%}
    6.         add 1 to {_slot}
    8. function savewallet(p: player):
    9.     set {_slot} to 0
    10.     loop 26 times: #Saving inventory
    11.         set {chest::%{_slot}%::%{_p}%} to slot {_slot} of current inventory of {_p}
    12.         add 1 to {_slot}
    14. on inventory close: #Saves the content when closing the inv
    15.     if event-inventory's name contains "Wallet":
    16.         savewallet(player)
    18. on rightclick with oak planks: #Loads the content when opening the wallet DONT FORGET TO CHANGE YOUR ITEM TYPE HERE INSTEAD OF "oak planks"
    19.     if event-item's name contains  "Wallet":
    20.         wallet(player)
    As stated in the code, dont forget to change what u need to change, also I wasnt sure what u meant by shulker box since its just a chest of 3 row so maybe I've done things wrong
    #2 MiiTsY, Jul 14, 2022
    Last edited: Jul 14, 2022
Thread Status:
Not open for further replies.

Share This Page