Jump to content

can anyone make me a /withdraw skript?


skeleton

Recommended Posts

Hi I was just wondering if anyone can make me a /withdraw skript so when you do /withdraw it makes a heart from your hearts turn into a item that you can give someone else or a /giveplayerheart which does the same just instead of it being a item it will give that play a heart what ever one is easer to do can you please do it?

Link to comment
Share on other sites

  • 9 months later...
  • 3 weeks later...
command /withdraw:
	remove 1 from player's max health
	give player 1 red dye named "&cHeart"

on rightclick:
	if player's tool is red dye named "&cHeart":
		add 1 to player's max health
		remove 1 red dye named "&cHeart" from player's inventory

 

image.png.f212204897ad1100be7ca5bf6c2936a8.png

Rank: [PRO]

Server Dev

Skripter

image.png

Link to comment
Share on other sites

  • 2 weeks later...

Here Is A Complete no bugs lifesteal skript.

 

 

variables:
    {lifesteal.**} = 10

every 1 tick:
 loop all players:
  if {lifesteal.%loop-player%} is not set:
   set {lifesteal.%loop-player%} to 10

 

on death of player:
  remove 1 from {lifesteal.%victim%}
  add 1 to {lifesteal.%attacker%}
  send "&a&lYou killed %victim% and gained 1 heart" to attacker
  send "&4&lYou died to %attacker% and lost a heart" to victim

every tick:
 loop all players:
  set loop-player's max health to {lifesteal.%loop-player%}
  if {lifesteal.%loop-player%} = 0:
   execute console command "/gamemode spectator %loop-player%

command /withdraw:
 aliases: /redeem
 trigger:
  remove 1 from {lifesteal.%player%}
  give 1 fermented spider eye named "&c&lHeart" to player

on rightclick with fermented spider eye:
    if name of tool of player is "&c&lHeart":
        add 1 to {lifesteal.%player%}
        remove 1 fermented spider eye named "&c&lHeart" from player's inventory
 
command /revive <player>:
 trigger:
  if {Dead.%arg-1%} is true:
   remove 5 from {Lifesteal.%player%}
   add 5 to {Lifesteal.%arg-1%}
   execute console command "/gamemode survival %arg-1%"
   broadcast "&2&l%arg-1% Was Revived By %player%!"

command /rehp <player>:
 aliases: /resethealth
 permission: op
 trigger:
  set {Lifesteal.%arg-1%} to 10
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...