Help Request Skript

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

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

Onuuk

Member
Mar 24, 2020
1
0
0
30
Hello,
I am using this skript as a economy replacement in my server but i cant get it to work any help would be apprciated. Thanks
Code:
variables:
    {gold.%player%} = 0

command /bal [<offlineplayer>]:
    trigger:
        if arg-1 is not set:
            message "&fYou currently have &6%{gold.%player%}%G&f on you."
        else:
            if player has permission "money.check":
                message "&eCommand $command %arg-1% could not be found! Try using $command help."
            else:
                message "&eCommand $command %arg-1% could not be found! Try using $command help."

command /pay <player> <number>:
    trigger:
        if arg-1 is "%player%":
            message "&cUnable to process your transaction at this time."
        else:
            if arg-2 > 0:
                if {gold.%player%} > 0:
                    remove arg-2 from {gold.%player%}
                    add arg-2 to {money.%arg-2%}
                    wait 1 tick
                    if {gold.%player%} > 0:
                        message "&fSeccessfully paid %arg-1% &6%arg-2%G" to player
                        message "&fYou were paid &6%arg-2%&f by %player%" to arg-1
                    else:
                        message "&6Unable to process your transaction at this time."
                        remove arg-2 from {money.%arg-2%}
                        add arg-2 to {gold.%player%}
                else:
                    message "&6Unable to process your transaction at this time."
            else:
                message "Seccessfully paid %arg-1% &60G"
                
                
                
                
                
                
command /bal [<player>]:
    trigger:
        if arg-1 is not set:
            message "&f%player% currently has &6%{balance.of.%player%}%G&f."
        if arg-1 is set:
            if player have permission "admin.check":
                message "&fYou currently have &6%{balance.of.%player%}%G&f on you."

command /balance:
    trigger:
        message "&fYou currently have &6%{balance.of.%player%}%G&f on you."

command /money:
    trigger:
        message "&fYou currently have &6%{balance.of.%player%}%G&f on you."

command /eco [<text>] [<player>] [<number>]:
    permission: admin.check
    trigger:
        arg-1 is "give"
        arg-2 is set
        if arg-3 is set:
            add arg-3 to {balance.of.%arg-2%}
            send "&fYou were paid &6%arg-3%G" to arg-2
        else:
            send "&e/eco [give] [player] [ammount]"     

command /pay [<player>] [<number>]:
    trigger:
        arg-2 is not set:
            send "&6/pay <player> <ammount>"
        arg-2 is set:
            remove arg-2 from {balance.of.%player%}
            add arg-2 to {balance.of.%arg-1%}
            send "&fSuccessfully paid %arg-1% &6%arg-2%G"
            send "&fYou were paid &6%arg-2%G&f by %player%" to arg-1
            
            
            
command /sell:
    aliases: sellall
    trigger:
        while amount of gold block in player's inventory is bigger than 0:
            remove 1 gold block from player's inventory
            execute console command "/eco give %player% 1"
        stop
 
Status
Not open for further replies.