HealthMonitor()
{
** *self endon("disconnect");
*** level endon("game_ended");
** *
*** self waittill("player_ready");
*** self.enabletext = true;
*** currenthealth = Int(self.health);
** *
*** for (;
*** {
** *** *if (currenthealth != Int(self.health))
** *** *{
** *** *** *currenthealth = Int(self.health);
** *** *** *self.healthvalue SetValue(Int(self.health));
** *** *}
** *** *
** *** *wait 0.05;
*** }
}
monitorhealth()
{
** *self endon( "disconnect" );
** *self endon( "normalHealth" );
** *level endon( "game_ended" );
** *self.healthmonitor = 1;
** *for(;
** *{
** *if( !(self.addinghealth) )
** *{
** *** *if( self.health > 100 )
** *** *{
** *** *** *self.maxhealth = self.health;
** *** *}
** *}
** *if( self.health < 100 )
** *{
** *** *self.maxhealth = 100;
** *** *self.healthmonitor = 0;
** *** *self notify( "normalHealth" );
** *}
** *wait 0.01;
** *}
}
givehealth( amount, status )
{
** *** *if (self.points >= level.price[status]["Health"])
** *** *{
** *** *** *self.addinghealth = 1;
** *** *** *self.points -= level.price[status]["Health"];
** *** *** *wait 0.01;
** *** *** *self.maxhealth = self.maxhealth + amount;
** *** *** *self.health = self.health + amount;
** *** *** *self.addinghealth = 0;
** *** *** *if( !(self.healthmonitor) )
** *** *{
** *** *** *self thread monitorhealth();
** *** *}
** ******** self IPrintLn("^1+100 Health ^7Purchased Successfully");
** * *** *}
** *** *else
****** *** *self IPrintLn("^1Error: ^7You Do Not Have Enough Points For This Item");
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.