name MCD
@model models/XQM/cylinderx1big.mdl
@persist On [O E]:entity Model:string Entity:entity U
Use=O:keyUse()
R=O:keyReload()
interval(50)
if(first()){
    O=owner()
    E=entity()
    U=12
    
    E:setAng(E:toWorld(ang(90,0,0)))
    E:setMaterial("models/props_lab/door_klab01")
    E:setColor(vec(255,180,150))
    E:setMass(50000)
    
    holoCreate(1,E:toWorld(vec(-17.5,0,0)),vec(1.5,1.5,1),E:toWorld(ang(-82.5,-90,90)),vec(255,180,150),"models/Mechanics/gears2/vert_12t1.mdl")
    holoMaterial(1,"models/props_lab/door_klab01")
    holoParent(1,E)
    
    holoCreate(2,E:toWorld(vec(-13,0,0)),vec(1,1.4,1.4),E:toWorld(ang(-82.5,-90,90)),vec(255,180,150),"models/props_phx/gears/bevel90_24.mdl")
    holoMaterial(2,"models/props_lab/door_klab01")
    holoParent(2,E)
    
    holoCreate(3,E:toWorld(vec(17,0,0)),vec(1,1,2.5),E:toWorld(ang(-97.5,-90,90)),vec(255,180,150),"models/Mechanics/gears/gear16x12.mdl")
    holoMaterial(3,"models/props_lab/door_klab01")
    holoParent(3,E)
    
    holoCreate(4,E:toWorld(vec(-18.79,0,0)),vec(0.9,0.9,0.9),E:toWorld(ang(-90,-90,90)),vec(20,20,20),"cplane")
    holoParent(4,E)
    
    holoCreate(5,E:toWorld(vec(-18.79,0,0)),vec(1.5,1.5,0.001),E:toWorld(ang(-90,-90,90)),vec(20,20,20),"hq_tube")
    holoParent(5,E)
    
    holoCreate(6,E:toWorld(vec(-18.79,0,13.5)),vec(0.07,0.15,0.001),E:toWorld(ang(-90,-90,90)),vec(20,20,20),"models/hunter/geometric/hex05x1.mdl")
    holoMaterial(6,"models/debug/debugwhite")
    holoParent(6,E)
    
    holoCreate(7,E:toWorld(vec(-18.79,-13.5,0)),vec(0.07,0.15,0.001),E:toWorld(ang(0,-90,90)),vec(20,20,20),"models/hunter/geometric/hex05x1.mdl")
    holoMaterial(7,"models/debug/debugwhite")
    holoParent(7,E)
    
    holoCreate(8,E:toWorld(vec(-18.79,0,-13.5)),vec(0.07,0.15,0.001),E:toWorld(ang(90,-90,90)),vec(20,20,20),"models/hunter/geometric/hex05x1.mdl")
    holoMaterial(8,"models/debug/debugwhite")
    holoParent(8,E)
    
    holoCreate(9,E:toWorld(vec(-18.79,13.5,0)),vec(0.07,0.15,0.001),E:toWorld(ang(180,-90,90)),vec(20,20,20),"models/hunter/geometric/hex05x1.mdl")
    holoMaterial(9,"models/debug/debugwhite")
    holoParent(9,E)
    
    holoCreate(10,E:pos(),vec(0.3,0.3,0.3),E:toWorld(ang(90,0,0)),vec(255,255,255),"models/effects/vol_light128x128.mdl")
    holoDisableShading(10,1)
    holoAlpha(10,0)
    holoParent(10,E)
}
if(changed(Use) & Use & O:aimEntity()==E & Model){
    if(On){
        soundStop(1,1)
        for(I=4,9){
            holoColor(I,vec(20,20,20))
            holoDisableShading(I,0)}
            stoptimer("T1"),holoDelete(11)
            holoAlpha(10,0),On=0
}
    else{
        for(I=4,9){holoColor(I,vec(255,255,255)),holoDisableShading(I,1)}
        holoAlpha(10,255)
        
        holoCreate(11,E:toWorld(vec(-30,0,0)),vec(1,1,1),E:toWorld(ang(-90,0,0)),vec(255,0,0),Model)
        holoMaterial(11,"models/props_combine/stasisfield_beam")
        holoDisableShading(11,1)
        holoParent(11,E)
        
        timer("T1",5000)
        E:soundPlay(1,0,"ambient/levels/citadel/citadel_drone_loop6.wav")
        
        On = !On
}}
if(changed(R) & R & O:aimEntity():isValid()){
    Model=O:aimEntity():model()
    Entity=O:aimEntity()
    Vehicle=O:aimEntity():isVehicle()
    print(Model + " has been added to database.")}
if(clk("T1")){
    for(I=4,9){holoColor(I,vec(20,20,20)),holoDisableShading(I,0)}
    
    E:soundPlay(2,0,"Weapon_CombineGuard.Special1")
    if(Entity:isPlayer()){        
        PL=propSpawn("models/hunter/blocks/cube05x1x05.mdl",E:toWorld(vec(-43,0,0)),E:toWorld(ang(0,-90,0)),0)
        PL:setMass(85)
        PL:setAlpha(0)
        U++
        
        holoCreate(U,PL:toWorld(vec(0,24,0)),vec(1,1,1),PL:toWorld(ang(-90,90,0)),vec(255,255,255),Model)
        holoAnim(U,"ACT_HL2MP_IDLE_physgun")
        holoParent(U,PL)
        U++
        
        holoCreate(U,holoEntity(U-1):attachmentPos("anim_attachment_RH"),vec(1,1,1),holoEntity(U-1):toWorld(ang(-15,-15,15)),vec(255,255,255),"models/weapons/w_physics.mdl")
        holoSkin(U,1)
        holoParentAttachment(U,holoEntity(U-1),"anim_attachment_RH")
        }else{
        P=propSpawn(Model,E:toWorld(vec(-30,0,0)),E:toWorld(ang(-90,0,0)),0)
    }
        soundStop(1,1)
        holoDelete(11)
        holoAlpha(10,0)
        On=0
}
