Solved rewind

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

Sunbex

New Member
Sep 13, 2021
8
0
1
23
i was wondering if it was possible to write a script where after a right click with an item, you are invincible and gain back the health you would have lost during that invincibility period (if you werent invincible) , after? If possible can someone write the script, it would be a big help? if not, thanks regardless!
 
Code:
on right click holding clock:
  if name of player's tool contains "Rewind":
    set {invicible::%player%} to true
    wait 5 seconds
    set {invicible::%player%} to false
    heal player by {invicible.hp::%player%}
    clear {invicible.hp::%player%}

on damage:
  if {invicible::%victim%} is true:
    add damage to {invicible.hp::%victim%}
    cancel event


//to fix issues when restarting server

on load:
  clear {invicible.hp::*}
  clear {invicible::*}

Idk if I understood correctly
 
Status
Not open for further replies.