A Lives 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 community!

    Now, what are you waiting for? Join the community now!

eeeeee

Member
Jul 5, 2025
1
0
1
Hi,
I was wondering if someone could make me a custom lives skript and u loose the lives on deaths and gain one when you kill someone.
I would also like it to have commands to manage it to give or remove lives or set lives
and if possibe can you add a lives counter bar?
 
Code:
command /lives <text> <player> [<int>]:
    permission: lives.use
    trigger:
        if arg-1 is "give":
            add arg-3 to {lives::%arg-2%}
            send "&aYou have given %arg-3% lives to %arg-2%." to player
        else if arg-1 is "take":
            remove arg-3 from {lives::%arg-2%}
            send "&cYou have taken %arg-3% lives from %arg-2%." to player
        else if arg-1 is "set":
            set {lives::%arg-2%} to arg-3
            send "&eYou have set %arg-2%'s lives to %arg-3%." to player
        else if arg-1 is "check":
            send "&b%arg-2% has %{lives::%arg-2%}% lives." to player
on join:
    if {lives::%player%} is not set:
        set {lives::%player%} to 3

on death:
    remove 1 from {lives::%victim%}
    if {lives::%victim%} is not set:
        set {lives::%victim%} to 0
    send "&cYou have lost a life. You have %{lives::%victim%}% lives remaining." to victim
    if attacker is a player:
        if {lives::%attacker%} is not set:
            set {lives::%attacker%} to 0
        add 1 to {lives::%attacker%}
        send "&aYou have killed %victim%. You now have %{lives::%attacker%}% lives." to attacker

every 1 seconds:
    loop all players:
        if {lives::%loop-player%} is not set:
            set {lives::%loop-player%} to 0
        send action bar "&eYou have %{lives::%loop-player%}% lives remaining." to loop-player
        if {lives::%loop-player%} <= 1:
            send "&cYou have been banned due to no lives remaining." to loop-player
            ban loop-player due to "No lives remaining."
            kick loop-player due to "No lives remaining."

on tab complete of "/lives" and "/skript:lives":
    set tab completions for position 1 to "give", "take", "set" and "check"
    set tab completions for position 3 to "1", "2", "3", "4" and "5"


it bans the plaeyrs that have no lives left