health.sk

Created by CrossPath

Other available versions. Ordered by newest to oldest versions:

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

command /giveheart [<offlineplayer>] [<integer>]:
    aliases: /gheart, /gh, /transferheart, /ghealth, /givehealth
    permission: custom.giveheart
    permission message: &cSorry! You do not have permission to this command.
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                if arg-2 is not less than 1:
                    if player's max health is more than arg-2:
                        add arg-2 to the arg-1's max health
                        subtract arg-2 from the player's max health
                        send "&aSuccess! You transferred %arg-2% heart(s) to %arg-1%!"
                        send "&aYou received %arg-2% heart(s) from %player%!" to arg-1
                    else:
                        send "&cYou do not have enough hearts to share!"
                else:
                    send "&cYou can't get health that easy. Sorry, not sorry."
            else:
                if player's max health is more than 1:
                    add 1 to the arg-1's max health
                    subtract 1 from the player's max health
                    send "&aSuccess! You transferred 1 heart to %arg-1%!"
                    send "&aYou received 1 heart from %player%!" to arg-1
        else:
            send "&cYou need to mention a player to share your hearts with!"

command /sethealth [<offlineplayer>] [<integer>]:
    aliases: /shealth, /sh, /setheart, /sheart
    permission: custom.sethealth
    permission message: &cSorry! You do not have permission to this command.
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                if arg-2 is not less than 1:
                    set max health of arg-1 to arg-2
                    send "&aSuccess! You set %arg-1%'s health to %arg-2%!"
                    send "&aYour health has been set to %arg-2% by %player%!" to arg-1
                else:
                    send "&cYou can't set their health to a value less than 1!"
            else:
                send "&cYou must specify a value of hearts to give them!"
        else:
            send "&cYou need to mention a player to set their health."

command /removehealth [<offlineplayer>] [<integer>]:
    aliases: /subtracthealth, /rhealth, /rh, /rheart, /removeheart, /subtractheart
    permission: custom.removehealth
    permission message: &cSorry! You do not have permission to this command.
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                subtract arg-2 from the arg-1's max health
                send "&aSuccess! You removed %arg-2% heart(s) from %arg-1%."
                send "&aYou lost %arg-2% heart(s) from %player% (ADMIN)." to arg-1
            else:
                subtract 1 from the arg-1's max health
                send "&aSuccess! You removed 1 heart from %arg-1%."
                send "&aYou lost 1 heart from %player% (ADMIN)." to arg-1
        else:
            send "&cYou need to mention a player to remove their hearts!"

command /addhealth [<offlineplayer>] [<integer>]:
    aliases: /ahealth, /additionalhealth, /ah, /addheart, /aheart
    permission: custom.addhealth
    permission message: &cSorry! You do not have permission to this command.
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                add arg-2 to the arg-1's max health
                send "&aSuccess! You added %arg-2% heart(s) to %arg-1%."
                send "&aYou gained %arg-2% heart(s) from %player% (ADMIN)." to arg-1
            else:
                add 1 to the arg-1's max health
                send "&aSuccess! You added 1 heart to %arg-1%."
                send "&aYou gained 1 heart from %player% (ADMIN)." to arg-1
        else:
            send "&cYou need to mention a player to give them hearts!"

command /viewhealth [<offlineplayer>]:
    aliases: /viewheart, /vheart, /vhealth, /vh
    permission: custom.viewhealth
    permission message: &cSorry! You do not have permission to this command.
    trigger:
        if arg-1 is set:
            send "&9%arg-1% currently has a maximum of &c%max health of arg-1% hearts&9!"
        else:
            send "&cYou need to mention a player to view their maximum health."

command /hearts help:
    aliases: /heart help, /health help, /cross help
    trigger:
        send "&bHeart Skript by CrossPath21"
        send "&6/giveheart (player) (number) &7- &fTransfers the hearts to the specified player."
        send "&6/sethealth (player) (number) &7- &fSets the hearts of the specified player."
        send "&6/removehealth (player) (number) &7- &fRemoves hearts of the specified player."
        send "&6/addhealth (player) (number) &7- &fAdds hearts of the specified player."
        send "&6/viewhealth (player) (number) &7- &fView the maximum number of hearts of the specified player."