Shop. Removal or prohibition of purchase

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

Status
Not open for further replies.

g1ps

New Member
May 1, 2021
6
0
1
How to delete an item in the store after purchase or prohibit its purchase ?

Thanks in advance !

Code:
command /Rank:
    trigger:
        open chest with 1 rows named "&a&lРанги" to player
        format gui slot 0 of player with paper named "test1" with lore "1000"
        format gui slot 1 of player with paper named "test2" with lore "2000"
        format gui slot 2 of player with paper named "test3" with lore "3000"

on inventory click:
    if event-item is paper named "test1" with lore "1000":
        cancel event
        if player's balance > 999:
            remove 1000 from player's balance
            execute console command "/giverank test1"
        if player's balance < 999:
            send "&6no money" to player
            cancel event
on inventory click:
    if event-item is paper named "test2" with lore "2000":
        cancel event
        if player's balance > 1999:
            remove 2000 from player's balance
            execute console command "/giverank test2"
        if player's balance < 1999:
            send "&6no money" to player
            cancel event
on inventory click:
    if event-item is paper named "test3" with lore "3000":
        cancel event
        if player's balance > 2999:
            remove 1000 from player's balance
            execute console command "/giverank test3"
        if player's balance < 2999:
            send "&6no money" to player
            cancel event
 
Status
Not open for further replies.