@name Big Digger Nick
@persist Base:entity [AV AVR]:angle [Ve VeR]:vector
@persist H K X0 X V0 V C X02 X2 V02 V2
interval(100)
if(first())
{
    H = 1/10
    
    Base = entity()
    
    for(I=1,10)
    {
        local J = I-1
        local B = (!J) ? Base : holoEntity(J)
        holoCreate(I,Base:toWorld(vec(0,0,-12+(I*10))),vec())
        holoParent(I,B)
    }
    
    for(I=11,20)
    {
        local B = holoEntity(I-10)
        holoCreate(I,B:toWorld(vec(0,0,6)))
        holoModel(I,"hq_cylinder")
        holoColor(I,vec(60,5,0))
        holoDisableShading(I,1)
        holoParent(I,B)
    }
    
    K = 25
}

Ve = Base:pos()
VeR = Base:toLocal($Ve)

AV = Base:angles()
AVR = $AV

V0 = V
X0 = X
A = -K * X - V * C 
V = V0 + A * H
X = clamp(X0 + V * H + (AVR:pitch() + VeR:x())/150,-15,15)
X *= 0.93

V02 = V2
X02 = X2
A2 = -K * X2 - V2 * C 
V2 = V02 + A2 * H
X2 = clamp(X02 + V2 * H + (AVR:roll() + VeR:y())/150,-15,15)
X2 *= 0.93

for(I=1,10)
{
    local J = I-1
    local B  =(!J) ? Base : holoEntity(J)
    holoAng(I,B:toWorld(-ang(X,0,-X2)))
}
