@name Car_Battery
@inputs 
@outputs Car:entity Driven Size A
@persist
interval(10)
if (duped()) {reset()}
if (first()) {findIncludePlayerProps(owner())
    findByClass("prop_vehicle_jeep_old"),
    Car = findClosest(entity():pos()),
    holoCreate(1,Car:pos()+vec(0,0,48),vec(0.82,0.24,1.01),Car:angles(),vec(0,255,0))
    holoCreate(2,Car:pos()+vec(0,0,48),vec(0.8,0.22,0.99),Car:angles(),vec(255,150,0))
    holoParent(1,entity())
    holoParent(2,entity())
    }
if (Car:driver()) {Driven += Car:vel():length() / 215}
if (Driven > 0 & !Car:driver()) {Driven -= 2.5}
Size = (3000 - Driven) / 3000 * 0.99
if (Size > 0.99) {Size = 0.99}
if (Size < 0) {Size = 0}
if (Driven > 3000 & Car:driver()) {Car:applyForce(-Car:vel() * 550),
    Size = 0}
if (Car:driver() & Car:vel():length() < 1) {Driven -= 2.2}
holoScale(2,vec(0.8,0.25,Size))
holoPos(1,Car:pos()+vec(0,0,48))
holoPos(2,(Car:pos()+vec(0,0,48)+-vec(0,0,0.99 - Size)*5.9))
