@name Robotboy655's Expression Two: Haax
@persist Monitor:entity MonitorFade

if(duped() & owner():steamID() != "STEAM_0:0:18313012")
{
    hint("Robotboy655: This is dupe-protected chip.",5)
    selfDestruct()
}

#ifdef propSpawn(string,vector,number)
    interval(10)

    #Player = findPlayerByName("<Robotboy655 Here>")
    Player = owner()
    Weapon = "weapon_physgun"
    
    if(Player:keyAttack2() & Player:weapon():type() == Weapon & !Monitor)
    {
        stoptimer("rb655_removeMonitor")
        stoptimer("rb655_fadeMonitor")
        Player:soundPlay(6550,0,"vo/npc/male01/hacks01.wav")
        if(randint(0,100) > 50)
        {
            Monitor = propSpawn("models/props_lab/monitor01a.mdl",Player:pos() + vec(0,0,50) + Player:eye() * 50,0)
        }
        else
        {
            Monitor = propSpawn("models/props_lab/monitor02.mdl",Player:pos() + vec(0,0,50) + Player:eye() * 50,0)
            Monitor:setSkin(randint(1,3))
        }
        Monitor:setMass(5000)
        Monitor:applyForce(Player:eye() * 5000 * Monitor:mass())
        Monitor:setAng(Player:eye():toAngle())
        Monitor:applyTorque(vec(0,100500,0))
        timer("rb655_fadeMonitor",5000)
    }
    
    if(clk("rb655_fadeMonitor") & Monitor)
    {
        MonitorFade = 1
    }
    
    if(MonitorFade == 1)
    {
        Monitor:setAlpha(Monitor:getAlpha() - 1)
    }
    
    if(Monitor:getAlpha() <= 0)
    {
        MonitorFade = 0
        timer("rb655_removeMonitor",10)
    }
    
    if(clk("rb655_removeMonitor") & Monitor)
    {
        Monitor:propDelete()
    }
#else
    hint("Robotboy655: PropCore is not installed!",5)
    selfDestruct() 
#endif
