@name Super Prop Power
@inputs 
@outputs  Ents:entity Ar:array Counter Sc T Op:vector
@outputs  Key2:vector Crouch:vector Key1:vector O:entity
@outputs  H1 H2 H3 H4 H5 Ec Col:vector
@persist 
interval(10)
if (duped() ) {reset()}
if (first()) {hint("Made by perli555",7),
    hint("Instructions Have Been Printed Into Console",7)
    print(1," ")
    print(1," ")
    print(1,"       Super Prop Conreol Power")
    print(1,"       Made by perli555")
    print(1," ")
    print(1,"       Look at 1 of your props and press Use to select it"),
    print(1,"       Crouch to make the selected props move where you are looking"),
    print(1,"       Mouse1 to pull the selected props"),
    print(1,"       Mouse2 to push the selected props")
    print(1,"       Mouse2 and mouse1 to make the selected props fly up")
    print(1," ")
    print(1," ")
    }
T+= 1
Op = O:pos() + vec(0,0,60)
O = owner()

Sc = O:aimEntity():radius()
if (O:aimEntity():owner() == O &
    O:keyUse()) 
    {
    Ar:pushEntity(O:aimEntity()) 
    holoCreate(O:aimEntity():id(),O:aimEntity():pos(),
    vec(Sc,Sc,Sc) / 4,ang(),vec(0,255,0),"sphere3")
    holoAlpha(O:aimEntity():id(),abs(sin(T) * 70))
    holoParent(O:aimEntity():id(),O:aimEntity())
    O:aimEntity():setTrails(32,0,8,"trails/laser",vec(0,255,0),100)
    }

Counter++
if (Counter > Ar:count()) {Counter = 1}
Ents = Ar:entity(Counter)
if (Ar:entity(Counter)==Ar:entity(Counter+1)) {Ar:removeEntity(Counter)}
holoAlpha(Ents:id(),abs(sin(T) * 70))
if (Ents == noentity()) {Ar:removeEntity(Counter)}

if (O:keyAttack1() & !O:keyAttack2() & !O:isCrouch()) 
    {Key1 = (Op - Ents:pos())
    Ents:applyForce((Key1 + $Key1) * Ents:mass() )
    holoColor(Ents:id(),vec(0,0,255)),H1=1} else {H1=0}
if (!O:keyAttack1() & O:keyAttack2() & !O:isCrouch()) 
    {Key2 = (Ents:pos() - Op)
    Ents:applyForce((Key2 + $Key2) * Ents:mass() ) 
    holoColor(Ents:id(),vec(255,0,0)),H2=1} else {H2=0}
if (!O:keyAttack1() & !O:keyAttack2() & O:isCrouch()) 
    {Crouch = (O:aimPos() - Ents:pos() )
    Ents:applyForce((Crouch + $Crouch) * Ents:mass() )
    holoColor(Ents:id(),vec(255,255,0)),H3=1} else {H3=0}
if (O:keyAttack1() & O:keyAttack2() & !O:isCrouch()) 
{Ents:applyForce(vec(0,0,500) * Ents:mass() )
    ,holoColor(Ents:id(),vec(255,0,255)),H4=1} else {H4=0}
if (!O:keyAttack1() & !O:keyAttack2() & !O:isCrouch()) 
    {holoColor(Ents:id(),vec(0,255,0)),H5=1} else {H5=0}

if (changed(H1) & H1) {Col = vec(0,0,255)}
if (changed(H2) & H2) {Col = vec(255,0,0)}
if (changed(H3) & H3) {Col = vec(255,255,0)}
if (changed(H4) & H4) {Col = vec(255,0,255)}
if (changed(H5) & H5) {Col = vec(0,255,0)}
if (changed(H1)|changed(H2)|changed(H3)|changed(H4)|changed(H5)) {
    Ar:entity(1):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(2):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(3):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(4):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(5):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(6):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(7):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(8):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(9):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(10):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(11):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(12):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(13):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(14):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(15):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(16):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(17):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(18):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(19):setTrails(32,0,1,"trails/laser",Col,255)
    Ar:entity(20):setTrails(32,0,1,"trails/laser",Col,255)
    }

