Jump to content
  • 0

[SKRIPT] Creating a Variable for each person for tokens


Fazaion

Question

This is my skript.
I need help to make a custom variable for each person like there UUIDs
Also BTW if it helps any better I'm on v1.18

command /givetokens <player> <integer>:
    permission: op
    permission message: "&cYou can't do this!"
    trigger:
        if arg-2 is not set:
            send "&4&l〔Corruption〕&7» Invaild arg-2"
        if arg-1 is not set:
            send "&4&l〔Corruption〕&7» Invaild arg-1"
        else:
            add arg-2 to {tokens::%player's uuid%}
            send "&4&l〔Corruption〕&7» You have recived &7%arg-2% &7tokens"

command /removetokens <player> <integer>:
    permission: op
    permission message: "&cYou can't do this!"
    trigger:
        if arg-2 is not set:
            send "&4&l〔Corruption〕&7» Invaild arg-2"
        if arg-1 is not set:
            send "&4&l〔Corruption〕&7» Invaild arg-1"
        else:
            remove arg-2 from {tokens::%player's uuid%}
            send "&4&l〔Corruption〕&7» You have removed &7%arg-2% &7tokens"

command /resettokens <player>:
    permission: op
    permission message: "&cYou Can't Do this!"
    trigger:
        if arg-1 is not set:
            send "&4&l〔Corruption〕&7» Invaild arg-1"
        else:
            set {tokens::%player's uuid%} to 0
            send "&4&l〔Corruption〕&7» You have reseted &7%arg-1%&7's tokens!"

command /tokens <player>:
    permission: tokens.see
    permission message: "&cYou don't have permission to do this!"
    trigger:
        send "&4&l〔Corruption〕&7» %arg-1% &7has &7%{tokens::%player's uuid%}% &7tokens"

Variables:
    {tokens::%player's uuid%} = 0

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...