Death money.

  • 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.
code_language.skript:
on death:
    attacker is a player
    victim is a player
    set {_m} to a random integer between 1 and 20
    if victim's balance is greater than or equal to {_m}:
        remove {_m} from victim's balance
        add {_m} to attacker's balance
    else:
        add victim's balance to attacker's balance
        set victim's balance to 0

I wasn't sure if it was taking money or not. If it is, then use the above code. If you just want to give the attacker money without taking the victims money, do this:
code_language.skript:
on death:
    attacker is a player
    victim is a player
    add (random integer between 1 and 20) to attacker's balance
 
Status
Not open for further replies.