@name cartest
@inputs 
@outputs 
@persist Car:entity Driver:entity Left Right  
@trigger 
interval(100)

if (first()|duped()){
    Car = entity():isWeldedTo()
    
    holoCreate(1)
    holoModel(1,"models/sprops/trans/lights/light_d4.mdl")
    holoPos(1,Car:toWorld(vec(26,-100,38)))
    holoAng(1,Car:toWorld(ang(0,-90,0)))
    
    holoCreate(2)
    holoModel(2,"models/sprops/trans/lights/light_d4.mdl")
    holoPos(2,Car:toWorld(vec(-26,-100,38)))
    holoAng(2,Car:toWorld(ang(0,-90,0)))
    
    holoCreate(3)
    holoModel(3,"models/sprops/trans/lights/light_a2.mdl")
    holoPos(3,Car:toWorld(vec(11,54.5,39)))
    holoAng(3,Car:toWorld(ang(0,90,0)))
    
    holoCreate(4)
    holoModel(4,"models/sprops/trans/lights/light_a2.mdl")
    holoPos(4,Car:toWorld(vec(-11,54.5,39)))
    holoAng(4,Car:toWorld(ang(0,90,0)))
    
    for (I = 1,4) {holoParent(I,Car)}
    
    lightCreate(1)
    lightColor(1,vec(255,0,0))
    lightPos(1,holoEntity(1):pos())
    lightParent(1,holoEntity(1))
    lightToggle(1,0)
    
    lightCreate(2)
    lightColor(2,vec(255,0,0))
    lightPos(2,holoEntity(2):pos())
    lightParent(2,holoEntity(2))
    lightToggle(2,0)
    
    Left = 0
    Right = 0
}

local Driver = Car:driver()
local Mouse1 = Driver:keyAttack1()
local Mouse2 = Driver:keyAttack2()
local Active = Driver:isPlayer()

if (changed(Mouse1) & Mouse1) { Left = 1 }

while (Left == 1) { holoColor(1,vec(255,0,0)) }

if (Right == 1) {
    
}
