@name Edible Bouncy Ball 
@inputs 
@outputs 
@persist Chat:array [A B C E]:entity 
@trigger 

LS = lastSaid()  
if (LS[1] == "-") {       
hideChat(1)
} 
if (first()){   

hint("How big? 1, 2, 3?",10)
hint("type -size <size>",10)
}

E=entity()
Chat = owner():lastSaid():explode(" ")

runOnTick(1)
runOnChat(1)

#----------------------------------------------------------------------------------------------
if(chatClk(owner()) & Chat[1,string]=="-size" & Chat[2,string]=="3"){
    A:propDelete()

    A=propSpawn("models/hunter/misc/shell2x2.mdl",entity():pos()+50,10)
    A:setMass(50)
    A:setMaterial("phoenix_storms/fender_white")
    A:setColor(vec(random(255),random(255),random(255)))


    holoCreate(0)
    holoPos(0, A:pos())
    holoScale(0, vec(-9,-9,-9))
    holoModel(0,"hqicosphere2")
    holoColor(0, vec(0,0,0))
    holoParent(0, A)


}
     findByClass("player")
    P = findClosest(A:pos())
    Use = P:keyUse()
    Hp = " 10"
    Name=P:name()
    if(Use==1){
     A:propDelete()   
    concmd("say Ball Eater: " +Name)
    }
 

    if(tickClk()){
    A:applyAngForce(ang(randvec(0,360))*1000999)

    }
#----------------------------------------------------------------------------------------------
if(chatClk(owner()) & Chat[1,string]=="-size" & Chat[2,string]=="2"){
    B:propDelete()

    B=propSpawn("models/hunter/misc/sphere1x1.mdl",10)
    B:setMass(25)
    B:setMaterial("phoenix_storms/fender_white")
    B:setColor(vec(random(255),random(255),random(255)))


    holoCreate(1)
    holoPos(1, B:pos())
    holoScale(1, vec(-4.4,-4.4,-4.4))
    holoModel(1,"hqicosphere2")
    holoColor(1, vec(0,0,0))
    holoParent(1, B)

}
     findByClass("player")
    P = findClosest(B:pos())
    Use = P:keyUse()
    Hp = " 10"
    Name=P:name()
    if(Use==1){
     B:propDelete()   
    concmd("say Ball Eater: " +Name)
    }


    if(tickClk()){
    B:applyAngForce(ang(randvec(0,360))*1000999)
    }
#----------------------------------------------------------------------------------------------
if(chatClk(owner()) & Chat[1,string]=="-size" & Chat[2,string]=="1"){
    C:propDelete()

    C=propSpawn("models/hunter/misc/sphere075x075.mdl",10)
    C:setMass(15)
    C:setMaterial("phoenix_storms/fender_white")
    C:setColor(vec(random(255),random(255),random(255)))


    holoCreate(2)
    holoPos(2, C:pos())
    holoScale(2, vec(-3.3,-3.3,-3.3))
    holoModel(2,"hqicosphere2")
    holoColor(2, vec(0,0,0))
    holoParent(2, C)



}
#----------------------------------------------------------------------------------------------
if(chatClk(owner()) & Chat[1,string]=="-size" & Chat[2,string]=="10"){
    A:propDelete()

    A=propSpawn("models/hunter/misc/sphere375x375.mdl",entity():pos()+50,10)
    A:setMass(50)
    A:setMaterial("phoenix_storms/fender_white")
    A:setColor(vec(random(255),random(255),random(255)))


    holoCreate(0)
    holoPos(0, A:pos())
    holoScale(0, vec(-15,-15,-15))
    holoModel(0,"hqicosphere2")
    holoColor(0, vec(0,0,0))
    holoParent(0, A)


}
     findByClass("player")
    P = findClosest(A:pos())
    Use = P:keyUse()
    Hp = " 10"
    Name=P:name()
    if(Use==1){
     A:propDelete()   
    concmd("say Ball Eater: " +Name)
    }
 

    if(tickClk()){
    A:applyAngForce(ang(randvec(0,360))*1000999)

    }

     findByClass("player")
    P = findClosest(C:pos())
    Use = P:keyUse()
    Hp = " 10"
    Name=P:name()
    if(Use==1){
     C:propDelete()   
    concmd("say Ball Eater: " +Name)
    }

    if(tickClk()){
    C:applyAngForce(ang(randvec(0,360))*1000999)
    }
