@name 
@inputs 
@outputs A G
@persist E:entity
@trigger 
interval(1000)
if(first()){
    A = 1
    G = 1
}
      if (owner():weapon():type()=="weapon_physcannon"){ 
        Head="anim_attachment_RH"
    
    for(I=1,1){
        holoCreate(I)
        holoPos(I,owner():attachmentPos(Head))
        holoAng(I,owner():attachmentAng(Head))
        holoPos(I,holoEntity(I):toWorld(vec(0,0,0+(-I*0))))
        holoAng(I,holoEntity(I):toWorld(ang(0,10,(-I*10)-0)))
        holoParentAttachment(I,owner(),Head)
        holoModel(I,"models/weapons/w_c4_planted.mdl")
        holoMaterial(I,"models/weapons/w_c4_planted.mdl")
        holoScale(I,vec(1,1,1))
         owner():weapon():setColor(0,0,0,0)
}
}else{
owner():weapon():setColor(255,255,255,255)
holoAlpha(1,0)
}

      if (owner():weapon():type()=="weapon_physcannon"){ 

        if(owner():keyAttack1()){
            if(G == 1){
            E = propSpawn("models/weapons/w_c4_planted.mdl",owner():aimPos(),0)
            G = 0
            holoAlpha(1,0)
            print("Bomb Deployed.")
            timer("bomb",35000)
            owner():weapon():setColor(255,255,255,255)
            A = 1
        }
    }
}

if(clk("bomb")){G = 1
    holoAlpha(1,255)
    print("Bomb Refilled.")
    owner():weapon():setColor(0,0,0,0)}
    
    if(A ==1){
        if(first()){
        E:soundPlay(99999,99999,"/mvm/sentrybuster/mvm_sentrybuster_loop.wav")
    timer("boom",7000)
    A = 0
    
    
}
}
    if(clk("boom")){

    E:soundPlay(999,999,"/mvm/sentrybuster/mvm_sentrybuster_spin.wav") 
    E:soundPlay(999,999,"/mvm/sentrybuster/mvm_sentrybuster_explode.wav") 
}

    
#/weapons/explode2.wav
#/mvm/sentrybuster/mvm_sentrybuster_loop.wav
#/mvm/sentrybuster/mvm_sentrybuster_spin.wav
