Skip to content

Instantly share code, notes, and snippets.

@brennancheung
Created May 31, 2020 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brennancheung/8d26a5725e8db6f5ddede9f6728af9ff to your computer and use it in GitHub Desktop.
Save brennancheung/8d26a5725e8db6f5ddede9f6728af9ff to your computer and use it in GitHub Desktop.
private void TP(BasePlayer player, MapNote note)
{
player.flyhackPauseTime = 10f;
var health = player.health;
var health2 = 100 - health;
player._health = 100000;
var pos = note.worldPosition + new Vector3(0,120,0);;
player.Teleport(pos);
Message(player, "Teleported", pos);
timer.Once(6f, () => { if (player == null) return; Message(player, "Cooldown", (100 - health2)); player.SetMaxHealth(100); player.Hurt(health2); });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment