@name Jihad
@persist B
interval(10)
if(first())
{
    entity():setColor(0,0,0,0)
    
    holoCreate(1)
    holoAlpha(1,0)
    holoPos(1, owner():attachmentPos("anim_attachment_RH"))
    holoPos(1,holoEntity(1):toWorld(vec(-1,1,-4)))
    holoAng(1, owner():attachmentAng("anim_attachment_RH"))
    holoAng(1,holoEntity(1):toWorld(ang(-10,0,5)))
    holoParentAttachment(1, owner(), "anim_attachment_RH")
    
    ## on/off switch hold
    holoCreate(100)
    holoModel(100, "hq_rcube")
    holoPos(100, holoEntity(1):toWorld(vec(1.4401, -0.0102, -3.5070)))
    holoAng(100, holoEntity(1):toWorld(ang(0.0000, 0.0000, 0.0000)))
    holoScale(100, vec(0.0252, 0.1000, 0.0196))
    holoColor(100, vec(0, 0, 0), 255)
    holoParent(100,1)


    ## Beep red
    holoCreate(101)
    holoModel(101, "hq_hdome_thin")
    holoPos(101, holoEntity(1):toWorld(vec(1.3496, 0.2896, -3.0961)))
    holoAng(101, holoEntity(1):toWorld(ang(90.0000, 0.0000, 0.0000)))
    holoScale(101, vec(0.0500, 0.0500, 0.0500))
    holoColor(101, vec(255, 0, 0), 255)
    holoParent(101,1)


    ## handle
    holoCreate(102)
    holoModel(102, "hq_rcylinder")
    holoPos(102, holoEntity(1):toWorld(vec(0.0000, 0.0000, 0.0000)))
    holoAng(102, holoEntity(1):toWorld(ang(0.0000, 0.0000, 0.0000)))
    holoScale(102, vec(0.2000, 0.2000, 0.8430))
    holoColor(102, vec(35, 53, 35), 255)
    holoParent(102,1)


    ## cap of handle
    holoCreate(103)
    holoModel(103, "hq_hdome_thin")
    holoPos(103, holoEntity(1):toWorld(vec(0.0000, 0.0000, 4.1776)))
    holoAng(103, holoEntity(1):toWorld(ang(0.0000, 0.0000, 0.0000)))
    holoScale(103, vec(0.2000, 0.2000, 0.2686))
    holoColor(103, vec(35, 53, 35), 255)
    holoParent(103,1)


    ## Explode button
    holoCreate(104)
    holoModel(104, "hq_rcylinder")
    holoPos(104, holoEntity(1):toWorld(vec(0.0000, 0.0000, 5.7790)))
    holoAng(104, holoEntity(1):toWorld(ang(0.0000, 0.0000, 0.0000)))
    holoScale(104, vec(0.0500, 0.0500, 0.1000))
    holoColor(104, vec(255, 0, 0), 255)
    holoParent(104,1)


    ## on/off electric box
    holoCreate(105)
    holoModel(105, "hq_rcube")
    holoPos(105, holoEntity(1):toWorld(vec(1.0778, 0.0000, -3.7783)))
    holoAng(105, holoEntity(1):toWorld(ang(0.0000, 0.0000, 0.0000)))
    holoScale(105, vec(0.0819, 0.1229, 0.2000))
    holoColor(105, vec(104, 104, 104), 255)
    holoParent(105,1)


    ## on/off switch
    holoCreate(106)
    holoModel(106, "hq_rcube")
    holoPos(106, holoEntity(1):toWorld(vec(1.6616, -0.3279, -3.5098)))
    holoAng(106, holoEntity(1):toWorld(ang(0.0000, 0.0000, 0.0000)))
    holoScale(106, vec(0.0179, 0.0140, 0.0134))
    holoColor(106, vec(0, 0, 0), 255)
    holoMaterial(106, "phoenix_storms/Indenttiles2")
    holoParent(106,1)


    ## Beep green
    holoCreate(107)
    holoModel(107, "hq_hdome_thin")
    holoPos(107, holoEntity(1):toWorld(vec(1.3496, -0.3221, -3.0961)))
    holoAng(107, holoEntity(1):toWorld(ang(90.0000, 0.0000, 0.0000)))
    holoScale(107, vec(0.0500, 0.0500, 0.0500))
    holoColor(107, vec(0, 255, 0), 255)
    holoParent(107,1)
}

owner():weapon():setAlpha(0)

if(B)
{
    if(clk("b"))
    {
        stoptimer("b")
        soundStop("s")
        propSpawn("models/props_phx/mk-82.mdl",owner():shootPos()-vec(0,0,5),1):propBreak()
        propSpawn("models/props_phx/mk-82.mdl",owner():shootPos()-vec(150,0,5),1):propBreak()
        propSpawn("models/props_phx/mk-82.mdl",owner():shootPos()-vec(200,0,5),1):propBreak()
        propSpawn("models/props_phx/mk-82.mdl",owner():shootPos()-vec(300,0,5),1):propBreak()
        B = 0
    }
}else
{
    if(owner():keyReload())
    {
        holoEntity(1):soundPlay("s",1.25,"radio/blow.wav")
        timer("b",1300)
        B = 1
    }
}

