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.

Need help with shop

Discussion in 'Skript' started by KJK, Jul 8, 2021.

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

    KJK Member

    Joined:
    Jul 8, 2021
    Messages:
    2
    Likes Received:
    0
    Cant figure out how to make it so they cant buy it if they dont have enough $


    command /petshop:
    trigger:
    open chest with 3 row named "Pet Shop" to player
    wait 1 tick
    format slot 0 of player with light gray glass named "ignore" with lore "ignore" to close then run "ingore test"
    format slot 10 of player with sheep spawn egg named "&a&lCommon Pet Egg" with lore "&7Price: &a10,000" to close then run [make console execute command "/ep giveegg %player% COMMON"]->[make console execute command "/eco take %player% 10000"]

    using vault and skquery
     
  2. AHappyLittleSloth

    Joined:
    Apr 22, 2020
    Messages:
    48
    Likes Received:
    4
  3. KJK

    KJK Member

    Joined:
    Jul 8, 2021
    Messages:
    2
    Likes Received:
    0
  4. AHappyLittleSloth

    Joined:
    Apr 22, 2020
    Messages:
    48
    Likes Received:
    4
    skript-gui is basically the same syntax as Tuske and works in 1.17
    Code (Text):
    1. command /petshop:
    2.     trigger:
    3.         create a gui with virtual chest inventory with 3 rows named named "Pet Shop"
    4.           make gui 10 with sheep spawn egg named "&a&lCommon Pet Egg" with lore "&7Price: &a10,000":
    5.               if balance of player >= 10000:
    6.                   remove 10000 from balance of player
    7.                   make console execute command "/ep giveegg %player% COMMON"
    8.         open last gui to player
     
Thread Status:
Not open for further replies.

Share This Page

Loading...