@name Expression 2: Flying Shit!
@persist Ent:entity Radius Number

interval(10)

if(duped())
{
  #  hint("Robotboy655: My chips are for personal use!",5)
  #  selfDestruct()
}

if(first())
{
    Ent = owner()
    Number = 2
    Radius = 20
    
    for(I=1,Number)
    {
        holoCreate(65515 + I)
        holoModel(65515 + I,"hqsphere")
        holoScale(65515 + I,vec(0.2,0.2,0.2))
        holoMaterial(65515 + I,"models/shiny")
        holoParent(65515 + I,Ent)
    }
}

for(I=1,Number)
{
    holoPos(65515 + I,Ent:pos() + vec(sin(curtime() * 60 + (I * 360/Number)) * Radius,cos(curtime() * 60 + (I * 360 / Number)) * Radius,24 + sin(curtime()*60)*16))
    
    if(100 / Ent:health() >= 2)
    {
        holoColor(65515+I,vec(255,Ent:health() / 50 * 255,0),255)
    }
    elseif(!Ent:isAlive())
    {
        holoColor(65515+I,vec(255,0,0),255)
    }
    else
    {
        holoColor(65515+I,vec(255 - Ent:health() / 50 * 255,255,0),255)
    }
}
