Solved Can someone please help me with this revive 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!

ArticArcher1

New Member
May 26, 2025
7
0
1
Code:
command revivehead [<player>]:
    trigger:
        give player 1 player head named "&e%arg-1%'s  Head"
        set {head::*} to "&e%arg-1%"


on rightclick:
    if player's tool is player head named "&e%{head::*}%'s  Head":
        send "You Revived %{head::*}%" to player
        remove 1 player head named "&e%{head::*}%'s  Head" from player's inventory
        set {head::*}'s max health to {_random}
        set {head::*}'s gamemode to survival
        cancel event

problem is:
Code:
set {head::*}'s max health to {_random}

        set {head::*}'s gamemode to survival
dont work

please help
 
Maybe like this:

AppleScript:
command revivehead [<player>]:
    trigger:
        give player 1 player head named "&e%arg-1%'s  Head"
        set {head} to arg-1

on rightclick:
    if player's tool is player head named "&e%{head}%'s  Head":
        send "You Revived %{head}%" to player
        remove 1 player head named "&e%{head}%'s  Head" from player's inventory
        set {_random} to a random integer between (1 value) and (2 value)
        set {head}'s max health to {_random}
        set {head}'s gamemode to survival
        cancel event

I think this won't work because you're not using a variable, but a list.

Also variable {_random} is not set