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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    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.

Pickaxe Upgrade GUI Help

Discussion in 'Skript' started by Jerooski, Apr 19, 2020.

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

    Jerooski Member

    Joined:
    Apr 19, 2020
    Messages:
    16
    Likes Received:
    0
    So my script lets you open the upgrade menu on right click. I want so players can only upgrade their pickaxes through the GUI but when the pickaxe is clicked, it only closes the menu and nothing else happens.

    Code (Text):
    1. on right click:
    2.   if name of player's tool is "&8Wood &7Pickaxe &8[&e1&8]":
    3.     wait 1 tick
    4.     open chest with 3 rows named "&ePickaxe Upgrades" to player
    5.     wait 1 tick
    6.     format slot 10 of player with wooden pickaxe named "&8Wood &7Pickaxe &8[&e2&8]" with lore "" and "&7Cost: &e128 Coal" to close then run [execute console command "/pickaxeupgrade2 %player%"]
    7.  
    8. command /pickaxeupgrade2 <player>:
    9.   permission: op
    10.   trigger:
    11.     if player has 128 coal:
    12.       set slot 2 of player's inventory to 1 wooden pickaxe of efficiency 1 named "&8Wood &7Pickaxe &8[
    13. &e2&8]" with lore "&7Level 2"
    14.       remove 128 coal from arg-1
    15.       remove wooden pickaxe named "&8Wood &7Pickaxe &8[&e1&8]" from arg-1
    16.       play sound "entity.player.levelup" with volume 0.5
    17.     else:
    18.       send "&cYou dont have 128 Coal to upgrade your pick!"
    19.       play sound "block.anvil.place" with volume 0.5
    --- Double Post Merged, Apr 20, 2020, Original Post Date: Apr 19, 2020 ---
    bump
     
  2. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    Pls don't use skquery inventory's read this: https://forums.skunity.com/threads/vanilla-guis.8939/#post-47928
     
Thread Status:
Not open for further replies.

Share This Page

Loading...