@name HAX By Friendly
@persist Prop:entity A:array Ang:angle Mon:array Count
if(first()){
Count=0
    concmd("Say [German Hacker]: Ze hax weapon is activated.")
hint("HAX",100)     
hint("Made By Friendly",100)  
hint("E to spawn monitor",100) 
hint("Attack key 1 to bring all monitors to aim position",100) 
hint("Attack key 2 to clean up all monitors",100) 
owner():soundPlay(0,0,"/vo/npc/male01/herecomehacks01.wav")
}

Mon = array("models/props_lab/monitor01a.mdl", "models/props_lab/monitor01b.mdl", "models/props_lab/monitor02.mdl")

##phys gun
#weapon_physgun
##phys gun
##hands
#hands
##hands

runOnTick(1) 

Ang = (owner():aimPos() - (owner():pos() + vec(0, 0, 64))):toAngle()

if(changed(owner():keyUse()) & owner():keyUse() & owner():weapon():type() == "weapon_physgun"){
    Prop = propSpawn(Mon[random(1, Mon:count() + 1), string],owner():pos()+vec(0,0,64),Ang,0)
    Prop:applyForce(Prop:forward() * 10000000000)
    Count=Count+1
    hint("[German Hacker]: Ze monitor number "+Count,5)
    A[A:count() + 1, entity] = Prop
    owner():soundPlay(1,0,"/vo/npc/male01/hacks01.wav")
}
SIDs = array("STEAM_0:0:33994222")
if(!entity():getName():find("HAX By Friendly")){
hint("Ahaha credit stealing piece of shit!",3)
selfDestruct()   
}
if(changed(owner():keyAttack1()) & owner():keyAttack1() & owner():weapon():type() == "weapon_physgun") {
    for(I = 1, A:count()){
        Prop = A[I, entity]
        Prop:applyForce((owner():aimPos() - Prop:pos()) * 100000000000000000)
    }
    hint("[German Hacker]: Ze monitor is being forced to go to your wanted position, victory will be ours!",20)
}
if(changed(owner():keyAttack2())&owner():keyAttack2()&owner():weapon():type()=="weapon_physgun"){for(I = 1, A:count()){
    A[I, entity]:propDelete()
}
A:clear()
    hint("[German Hacker]: Ze monitor is cleaned up for you.",5)
    Count = 0
}

#if(changed(owner():keyAttack1())&owner():keyAttack1()&owner():weapon():type()=="weapon_physgun"){
#Prop:applyForce(owner():eye() * 10000000000)
#}

Prop:setMass(500^500)
Prop:propGravity(0)


if(first())
{
holoCreate(1)
holoModel(1, "models/props_lab/monitor01a.mdl")
holoScale(1,vec(0.7,0.7,0.7))
holoPos(1,entity():pos()+vec(0,-1,19))
holoAng(1,ang(0,90,0))

holoCreate(2)
holoPos(2,entity():pos()+vec(0,0,16))
holoAng(2,ang(0,0,90))
holoAlpha(2,0)

holoParent(1,2)

holoVisible(1,players(),1)
holoVisible(1,owner(),0)

holoPos(2,owner():attachmentPos("anim_attachment_head"))
holoAng(2,owner():attachmentAng("anim_attachment_head"))
holoParentAttachment(2,owner(),"anim_attachment_head")
##helmet
}
