@name Dodge Charger 1969
@inputs 
@outputs 
@persist I M HoloCount RGB:vector E:entity 
@trigger 
interval(10)

if (dupefinished()) {reset()}

if (first()) {
    HoloCount = 28
    M = HoloCount
    E = entity():isWeldedTo()
    
    RGB = vec(255,0,0)
}

if (I < M & holoCanCreate()) {
    I++
    
    holoCreate(I)
    holoParent(I,E)
    
    for (Mat = 1,HoloCount) {holoMaterial(Mat,"WTP/paint_5")}
    
    holoModel(1,"hq_rcube_thick")
    holoPos(1,E:toWorld(vec(0,0,10)))
    holoAng(1,E:toWorld(ang(0,0,0)))
    holoScale(1,vec(20,7,3))
    
    holoClipEnabled(1,1,1)
    holoClip(1,1,vec(40,0,0),vec(1,0,0),0)
    
    holoClipEnabled(1,2,1)
    holoClip(1,2,vec(118,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(1,3,1)
    holoClip(1,3,vec(0,15,0),vec(0,1,0),0)
    
    holoClipEnabled(1,4,1)
    holoClip(1,4,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(2,"hq_rcube_thick")
    holoPos(2,E:toWorld(vec(0,0,10)))
    holoAng(2,E:toWorld(ang(0,0,0)))
    holoColor(2,RGB)
    holoScale(2,vec(20,7,3))
    
    holoClipEnabled(2,1,1)
    holoClip(2,1,vec(40,0,0),vec(1,0,0),0)
    
    holoClipEnabled(2,2,1)
    holoClip(2,2,vec(118,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(2,3,1)
    holoClip(2,3,vec(0,5,0),vec(0,1,0),0)
    
    holoClipEnabled(2,4,1)
    holoClip(2,4,vec(0,15,0),vec(0,-1,0),0)
    
    holoClipEnabled(2,5,1)
    holoClip(2,5,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(3,"hq_rcube_thick")
    holoPos(3,E:toWorld(vec(0,0,10)))
    holoAng(3,E:toWorld(ang(0,0,0)))
    holoScale(3,vec(20,7,3))
    
    holoClipEnabled(3,1,1)
    holoClip(3,1,vec(40,0,0),vec(1,0,0),0)
    
    holoClipEnabled(3,2,1)
    holoClip(3,2,vec(118,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(3,3,1)
    holoClip(3,3,vec(0,-5,0),vec(0,1,0),0)
    
    holoClipEnabled(3,4,1)
    holoClip(3,4,vec(0,5,0),vec(0,-1,0),0)
    
    holoClipEnabled(3,5,1)
    holoClip(3,5,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(4,"hq_rcube_thick")
    holoPos(4,E:toWorld(vec(0,0,10)))
    holoAng(4,E:toWorld(ang(0,0,0)))
    holoColor(4,RGB)
    holoScale(4,vec(20,7,3))
    
    holoClipEnabled(4,1,1)
    holoClip(4,1,vec(40,0,0),vec(1,0,0),0)
    
    holoClipEnabled(4,2,1)
    holoClip(4,2,vec(118,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(4,3,1)
    holoClip(4,3,vec(0,-15,0),vec(0,1,0),0)
    
    holoClipEnabled(4,4,1)
    holoClip(4,4,vec(0,-5,0),vec(0,-1,0),0)
    
    holoClipEnabled(4,5,1)
    holoClip(4,5,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(5,"hq_rcube_thick")
    holoPos(5,E:toWorld(vec(0,0,10)))
    holoAng(5,E:toWorld(ang(0,0,0)))
    holoScale(5,vec(20,7,3))
    
    holoClipEnabled(5,1,1)
    holoClip(5,1,vec(40,0,0),vec(1,0,0),0)
    
    holoClipEnabled(5,2,1)
    holoClip(5,2,vec(118,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(5,3,1)
    holoClip(5,3,vec(0,-15,0),vec(0,-1,0),0)
    
    holoClipEnabled(5,4,1)
    holoClip(5,4,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(6,"hq_rcube_thick")
    holoPos(6,E:toWorld(vec(0,0,10)))
    holoAng(6,E:toWorld(ang(0,0,0)))
    holoScale(6,vec(20,7,3))
    
    holoClipEnabled(6,1,1)
    holoClip(6,1,vec(40,0,0),vec(1,0,0),0)
    
    holoClipEnabled(6,2,1)
    holoClip(6,2,vec(118,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(6,4,1)
    holoClip(6,4,vec(0,0,1),vec(0,0,-1),0)
    
    holoModel(7,"hq_rcube_thick")
    holoPos(7,E:toWorld(vec(0,0,10)))
    holoAng(7,E:toWorld(ang(0,0,0)))
    holoScale(7,vec(20,7,3))
    
    holoClipEnabled(7,1,1)
    holoClip(7,1,vec(118,0,0),vec(1,0,0),0)
    
    holoClipEnabled(7,2,1)
    holoClip(7,2,vec(0,0,1),vec(0,0,-1),0)
    
    holoModel(8,"hq_rcube_thick")
    holoPos(8,E:toWorld(vec(236,0,10)))
    holoAng(8,E:toWorld(ang(0,180,0)))
    holoScale(8,vec(-20,-7,-3))
    
    holoClipEnabled(8,1,1)
    holoClip(8,1,vec(118,0,0),vec(1,0,0),0)
    
    holoClipEnabled(8,2,1)
    holoClip(8,2,vec(0,0,1),vec(0,0,1),0)
    
    holoClipEnabled(8,3,1)
    holoClip(8,3,vec(119,0,0),vec(-1,0,0),0)
    
    holoModel(9,"hq_rcube_thick")
    holoMaterial(9,"WTP/carbonfibre_2")
    holoPos(9,E:toWorld(vec(236,0,10)))
    holoAng(9,E:toWorld(ang(0,180,0)))
    holoScale(9,vec(-20,-7,-3))
    
    holoClipEnabled(9,1,1)
    holoClip(9,1,vec(119,0,0),vec(1,0,0),0)
    
    holoClipEnabled(9,2,1)
    holoClip(9,2,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(10,"hq_rcube_thick")
    holoPos(10,E:toWorld(vec(0,0,10)))
    holoAng(10,E:toWorld(ang(0,0,0)))
    holoScale(10,vec(20,7,0.5))
    
    holoClipEnabled(10,1,1)
    holoClip(10,1,vec(114,0,0),vec(1,0,0),0)
    
    holoModel(11,"hq_rcube_thick")
    holoPos(11,E:toWorld(vec(0,0,10)))
    holoAng(11,E:toWorld(ang(0,0,0)))
    holoScale(11,vec(20,7,3))
    
    holoClipEnabled(11,1,1)
    holoClip(11,1,vec(0,40,0),vec(0,1,0),0)
    
    holoClipEnabled(11,2,1)
    holoClip(11,2,vec(-40,0,0),vec(1,0,0),0)
    
    holoModel(12,"hq_rcube_thick")
    holoPos(12,E:toWorld(vec(0,0,10)))
    holoAng(12,E:toWorld(ang(0,0,0)))
    holoScale(12,vec(20,7,3))
    
    holoClipEnabled(12,1,1)
    holoClip(12,1,vec(0,-40,0),vec(0,-1,0),0)
    
    holoClipEnabled(12,2,1)
    holoClip(12,2,vec(-40,0,0),vec(1,0,0),0)
    
    holoModel(13,"hq_rcube_thick")
    holoPos(13,E:toWorld(vec(0,0,10)))
    holoAng(13,E:toWorld(ang(0,0,0)))
    holoScale(13,vec(20,7,3))
    
    holoClipEnabled(13,1,1)
    holoClip(13,1,vec(0,0,-10),vec(0,0,-1),0)
    
    holoClipEnabled(13,2,1)
    holoClip(13,2,vec(-40,0,0),vec(1,0,0),0)
    
    holoModel(14,"hq_rcube_thick")
    holoPos(14,E:toWorld(vec(0,0,10)))
    holoAng(14,E:toWorld(ang(0,0,0)))
    holoScale(14,vec(20,7,3))
    
    holoClipEnabled(14,1,1)
    holoClip(14,1,vec(-40,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(14,2,1)
    holoClip(14,2,vec(-108,0,0),vec(1,0,0),0)
    
    holoClipEnabled(14,3,1)
    holoClip(14,3,vec(0,15,0),vec(0,1,0),0)
    
    holoClipEnabled(14,4,1)
    holoClip(14,4,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(15,"hq_rcube_thick")
    holoPos(15,E:toWorld(vec(0,0,10)))
    holoAng(15,E:toWorld(ang(0,0,0)))
    holoColor(15,RGB)
    holoScale(15,vec(20,7,3))
    
    holoClipEnabled(15,1,1)
    holoClip(15,1,vec(-40,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(15,2,1)
    holoClip(15,2,vec(-108,0,0),vec(1,0,0),0)
    
    holoClipEnabled(15,3,1)
    holoClip(15,3,vec(0,5,0),vec(0,1,0),0)
    
    holoClipEnabled(15,4,1)
    holoClip(15,4,vec(0,15,0),vec(0,-1,0),0)
    
    holoClipEnabled(15,5,1)
    holoClip(15,5,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(16,"hq_rcube_thick")
    holoPos(16,E:toWorld(vec(0,0,10)))
    holoAng(16,E:toWorld(ang(0,0,0)))
    holoScale(16,vec(20,7,3))
    
    holoClipEnabled(16,1,1)
    holoClip(16,1,vec(-40,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(16,2,1)
    holoClip(16,2,vec(-108,0,0),vec(1,0,0),0)
    
    holoClipEnabled(16,3,1)
    holoClip(16,3,vec(0,-5,0),vec(0,1,0),0)
    
    holoClipEnabled(16,4,1)
    holoClip(16,4,vec(0,5,0),vec(0,-1,0),0)
    
    holoClipEnabled(16,5,1)
    holoClip(16,5,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(17,"hq_rcube_thick")
    holoPos(17,E:toWorld(vec(0,0,10)))
    holoAng(17,E:toWorld(ang(0,0,0)))
    holoColor(17,RGB)
    holoScale(17,vec(20,7,3))
    
    holoClipEnabled(17,1,1)
    holoClip(17,1,vec(-40,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(17,2,1)
    holoClip(17,2,vec(-108,0,0),vec(1,0,0),0)
    
    holoClipEnabled(17,3,1)
    holoClip(17,3,vec(0,-15,0),vec(0,1,0),0)
    
    holoClipEnabled(17,4,1)
    holoClip(17,4,vec(0,-5,0),vec(0,-1,0),0)
    
    holoClipEnabled(17,5,1)
    holoClip(17,5,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(18,"hq_rcube_thick")
    holoPos(18,E:toWorld(vec(0,0,10)))
    holoAng(18,E:toWorld(ang(0,0,0)))
    holoScale(18,vec(20,7,3))
    
    holoClipEnabled(18,1,1)
    holoClip(18,1,vec(-40,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(18,2,1)
    holoClip(18,2,vec(-108,0,0),vec(1,0,0),0)
    
    holoClipEnabled(18,3,1)
    holoClip(18,3,vec(0,-15,0),vec(0,-1,0),0)
    
    holoClipEnabled(18,4,1)
    holoClip(18,4,vec(0,0,1),vec(0,0,1),0)
    
    holoModel(19,"hq_rcube_thick")
    holoPos(19,E:toWorld(vec(0,0,10)))
    holoAng(19,E:toWorld(ang(0,0,0)))
    holoScale(19,vec(20,7,3))
    
    holoClipEnabled(19,1,1)
    holoClip(19,1,vec(-40,0,0),vec(-1,0,0),0)
    
    holoClipEnabled(19,2,1)
    holoClip(19,2,vec(-108,0,0),vec(1,0,0),0)
    
    holoClipEnabled(19,3,1)
    holoClip(19,3,vec(0,0,1),vec(0,0,-1),0)
    
    holoModel(20,"hq_rcube_thick")
    holoPos(20,E:toWorld(vec(-215,0,10)))
    holoAng(20,E:toWorld(ang(0,0,0)))
    holoScale(20,vec(-20,-7,-3))
    
    holoClipEnabled(20,1,1)
    holoClip(20,1,vec(108,0,0),vec(1,0,0),0)
    
    holoModel(21,"hq_rcube_thick")
    holoPos(21,E:toWorld(vec(37,0,10)))
    holoAng(21,E:toWorld(ang(20,0,0)))
    holoScale(21,vec(1,6.98,3))
    
    holoModel(22,"hq_rcube_thick")
    holoPos(22,E:toWorld(vec(-42,0,10)))
    holoAng(22,E:toWorld(ang(0,0,0)))
    holoScale(22,vec(1,6.67,2.98))
    
    holoPos(23,E:toWorld(vec(0,34,11)))
    holoAng(23,E:toWorld(ang(0,90,0)))
    holoScale(23,vec(1,6.67,2))
    
    holoPos(24,E:toWorld(vec(0,-34,11)))
    holoAng(24,E:toWorld(ang(0,90,0)))
    holoScale(24,vec(1,6.67,2))
    
    holoPos(25,E:toWorld(vec(0,0,2)))
    holoAng(25,E:toWorld(ang(0,0,0)))
    holoScale(25,vec(6.67,7,0.1))
    
    holoModel(26,"hq_rcube_thick")
    holoPos(26,E:toWorld(vec(37,0,10)))
    holoAng(26,E:toWorld(ang(40,0,0)))
    holoScale(26,vec(6.67,6.67,3))
    holoColor(26,vec(0,0,0),100)
    
    #ClipAng = holoEntity(1):angles()+ang(170,0,0)
    #holoClipEnabled(1,2,1)
    #holoClip(1,2,vec(0,23,0),ClipAng:forward(),0)
    
    holoModel(27,"hq_rcube_thick")
    holoPos(27,E:toWorld(vec(0,0,26.3)))
    holoAng(27,E:toWorld(ang(0,0,0)))
    holoScale(27,vec(7.5,6.67,3))
    holoColor(27,vec(0,0,0),100)
    
    holoClipEnabled(27,1,1)
    holoClip(27,1,vec(0,0,-3.5),vec(0,0,1),0)
    
    holoClipEnabled(27,2,1)
    holoClip(27,2,vec(-19,0,0),vec(1,0,0),0)
    
    holoClipEnabled(27,3,1)
    holoClip(27,3,vec(19,0,0),vec(-1,0,0),0)
    
    holoModel(28,"hq_rcube_thick")
    holoPos(28,E:toWorld(vec(-35,0,1.8)))
    holoAng(28,E:toWorld(ang(-55,0,0)))
    holoScale(28,vec(7.5,6.67,3))
    holoColor(28,vec(0,0,0),100)
}
