Jump to content

Recommended Posts

Posted

I am looking for a Lifesteal skript. One that enables you to give hearts with /givehearts (but not if you have 1). You also can't die, when you get to one heart you stay at one heart and that heart isn't given to anyone when killed.

I would appreciate this soso much.

 

Thank you,
UhTrevor

Hello! I am Trevor

u may see me from time to time but i'm not very active here anymore...

i joined in like 2019 i think

@tripph on discord

i was helper a while ago 😛

  • 2 weeks later...
Posted
on death:
	if victim is player:
		if attacker is player:
			remove 1 from victim's max health
			add 1 to attacker's max health
		else:
			stop
	else:	
		stop

Hope this works (leave a like if helps 👍)

  • Like 1

If this helped make sure to leave a like 🙂 

 

Programmer 

Owner of fishymini

Languages used:

Python

Html

Java

JS

Skript

 

  • 1 year later...
Posted

# Simple lifesteal skript



on death:
	if victim is player:
		if attacker is player:
			if victim's max health is not less than 2:
				remove 1 from victim's max health
				add 1 to attacker's max health
				send "&aPlayer heart obtained" to attacker
			else:
				cancel event
				send "&c%victim% does not have enough hearts to steal from!" to attacker
				
				
command /givehearts <player>:
	trigger:
		if max health of player is not less than 2:
			remove 1 from player's max health
			add 1 to arg-1's max health
		else:
			send "You do not have enough hearts to /givehearts!"

This isn't tested but I think it might work (let me know if it does)

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