@name Printer
@inputs
@model models/props_c17/consolebox01a.mdl
@persist Prop:entity Props:array
interval(10)
timer("delete",100000)
    E = entity()
    P = owner()
 Random = 1
if(changed(P:keyReload())&P:keyZoom())
{
    timer("Sound",2500)
            soundPlay(1,0, "ambient/levels/labs/equipment_printer_loop1.wav")
            Props:pushEntity(Prop)}

    
 if( Random ){
        if( randint(1,2500) == 1 )
        {timer("Sound",2500)
            soundPlay(1,0, "ambient/levels/labs/equipment_printer_loop1.wav")}
            
    }
        if(clk("Sound")){
 Prop = propSpawn("models/props/cs_assault/money.mdl", E:toWorld(vec(21,0,20)), E:angles(), 0)
, soundStop(1,0)
Props:pushEntity(Prop)
}
if(clk("delete") & Props:count())
{Props:shiftEntity():propDelete()
Props:propDelete()}

if (duped()) {selfDestruct(), hint("You cannot duplicate this",10)}
