@name Sweet Ass Drone
@inputs 
@outputs 
@persist 
@trigger 

if(duped()&1){
print(_HUD_PRINTCENTER,"Chip Protected. Didn't see that one comming did you?") selfDestruct() holoDeleteAll()
}

if (first()){
E=entity()

function cReate(Index, Model:string, Position:vector, Angle:angle, Scale:vector)
    {
        holoCreate(Index)
        holoModel(Index,Model)
        holoPos(Index,Position)
        holoAng(Index,Angle)
        holoScale(Index,Scale)
        holoParent(Index,E)
    }
cReate(1,"hq_icosphere",E:toWorld(vec(0,0,0)),E:toWorld(ang(0,0,0)),vec(4,4,4))#Body
cReate(2,"hq_icosphere",E:toWorld(vec(0,0,0)),E:toWorld(ang(0,0,0)),vec(4,4,4))#Right Arm
cReate(3,"hq_icosphere",E:toWorld(vec(0,0,0)),E:toWorld(ang(0,0,0)),vec(4,4,4))#Right Arm
cReate(4,"hq_icosphere",E:toWorld(vec(0,5,0)),E:toWorld(ang(0,0,0)),vec(4,4,4))#Right Arm Triggered
cReate(5,"hq_icosphere",E:toWorld(vec(0,-5,0)),E:toWorld(ang(0,0,0)),vec(4,4,4))#Left Arm Triggered
cReate(6,"models/weapons/w_shot_xm1014.mdl",E:toWorld(vec(-12,19,-5)),E:toWorld(ang(0,180,0)),vec(1,1,1))#Right Arm Weapon
cReate(7,"models/weapons/w_shot_xm1014.mdl",E:toWorld(vec(-12,-19,-5)),E:toWorld(ang(0,180,0)),vec(1,1,1))#Right Arm Weapon
cReate(8,"square",E:toWorld(vec(-18,0,7)),E:toWorld(ang(0,0,0)),vec(1,1,0.1))#Face Part
cReate(9,"square",E:toWorld(vec(-18,0,-7)),E:toWorld(ang(0,0,0)),vec(1,1,0.1))#Face Part
cReate(10,"models/hunter/geometric/hex1x1.mdl",E:toWorld(vec(-23.6,0,0)),E:toWorld(ang(0,90,90)),vec(0.13,0.13,0.5))#Face Part

holoColor(4,vec(),0)
holoColor(5,vec(),0)
holoColor(6,vec(),0)
holoColor(7,vec(),0)
holoColor(10,vec(122,122,122))

holoMaterial(10,"models/props/cs_assault/metal_stairs1")
}
holoClipEnabled(1,1,1)
holoClip(1,vec(0,-18,0),vec(0,1,0),0)

holoClipEnabled(1,2,1)
holoClip(1,2,vec(0,18,0),vec(0,-1,0),0)

holoClipEnabled(1,3,1)
holoClip(1,3,vec(-23.4,0,0),vec(1,0,0),0)

holoClipEnabled(2,1,1)
holoClip(2,vec(0,18,0),vec(0,1,0),0)

holoClipEnabled(3,1,1)
holoClip(3,vec(0,-18,0),vec(0,-1,0),0)

holoClipEnabled(4,1,1)
holoClip(4,vec(0,18,0),vec(0,1,0),0)

holoClipEnabled(5,1,1)
holoClip(5,vec(0,-18,0),vec(0,-1,0),0)

runOnChat(1)

if (chatClk(owner())) {
    local Command=owner():lastSaid():explode(" ")
    if (Command[1,string]==".weapon") {
        hideChat(1)
        holoColor(2,vec(),0)
        holoColor(3,vec(),0)
        holoColor(4,vec(255),255)
        holoColor(5,vec(255),255)
        holoColor(6,vec(255),255)
        holoColor(7,vec(255),255)
    }
    elseif (Command[1,string]==".safe"){
        hideChat(1)
        holoColor(2,vec(255),255)
        holoColor(3,vec(255),255)
        holoColor(4,vec(),0)
        holoColor(5,vec(),0)
        holoColor(6,vec(),0)
        holoColor(7,vec(),0)
    }
}

