Give all items in gui on gui close

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

tommimoro

Member
Apr 19, 2023
4
0
1
Hi, how do I give all the rewards in a gui on gui close?

I already have the gui setup to have all the items to be stealable however how do I give a player all the items in it if he closes it? this is to avoid potentially losing some of those items
 
You could loop the items in the gui and give them to the player, here is an example:
Code:
set {_slot} to 0
loop 54 times:
    give slot {_slot} of player's current inventory to player
    add 1 to {_slot}