give playervault to a player that right clicks with an ender chest named 87

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

elyexee

Member
Jul 16, 2023
30
0
6
hey i wanted to know if somebody could help me do this skript for my lifesteal box server pls. so can somebody do me a skript that when a player right clicks with a ender chest named "&f&lVault +1" that takes off one ender chest if he has multiple ender chests and gives one playervault to the player pls
 
hey i wanted to know if somebody could help me do this skript for my lifesteal box server pls. so can somebody do me a skript that when a player right clicks with a ender chest named "&f&lVault +1" that takes off one ender chest if he has multiple ender chests and gives one playervault to the player pls
are you ok if it requires powerranks?
 
here you go
Code:
on rightclick:
    if player has ender chest named "&f&lVault +1":
        cancel event
        remove 1 ender chest named "&f&lVault +1" from player
        set {Vault.number.%player's uuid%} to {Vault.number.%player's uuid%} + 1
        execute command "/lp user %player% permission unset playervaults.amount.%{Vault.number.%player's uuid%}%"
        execute command "/lp user %player% permission set playervaults.amount.%{Vault.number.%player's uuid%} - 1%"

on join:
    if {Vault.number.%player's uuid%} is not set:
        set {Vault.number.%player's uuid%} to 0
 
the only thing is that i need to redeem.2 times to get 2 player vaults and i dont want that.i want so when u right click it already gives u the 2nd pv because tge 1rst is free