@name alyx RAPE
@persist Barrels:array Target:entity TargetName:string

if( first() )
{ 
    runOnChat(1)
    runOnTick(1)
    

    entity():setAlpha(255)
    
    findIncludePlayerProps(owner())
    findIncludeClass("prop_physics")}

if( chatClk(owner()) ){
    ChatArray = owner():lastSaid():explode(" ")
    
    if( ChatArray:string(1) == "t" ){
        hideChat(1)
    TargetName = ChatArray:string(2)
    }
}

if( findCanQuery() )
{
    if( TargetName )
    {
        Target = findPlayerByName(TargetName)
        TargetName = ""
    }
    else
    {
        
        findByModel("models/props_c17/oildrum001.mdl")   
        Barrels = findToArray()
    }
}


for(Index = 1, Barrels:count())
{
    Barrel = Barrels:entity(Index)
    
    if( Target:isAlive() )
    {
        if( Barrel:mass() != 50000 )
        {
            
         Barrel:setAlpha(255)
            Barrel:setMass(50000)
            }
            
        Barrel:applyForce(((Target:pos() + vec(0, 0, 100) - Barrel:massCenter()) * Barrel:pos():distance(Target:pos() + vec(0, 0, 36)) - Barrel:vel()) * Barrel:mass())

    }
}
if(owner():keyAttack1()){
Barrel:propBreak()
}



