@name Vision Bomb
@inputs N
@outputs Spawn On Chat:string
@persist N1 On
@trigger all
if(duped()){
    print("Commands:")
    print("'Vision on' enables missile spawning")
    print("'Vision off' disabled missiles spawning")
    print("To spawn press use and right click at the same time")
}
interval(1)
runOnChat(1)
O=entity():owner()
Chat=O:lastSaid()
On1=Chat:find("Vision on")
On2=Chat:find("Vision off")
K=chatClk()
if(K){
if(On1){On=1 print("Vision Bomb On")}
if(On2){On=0 print("Vision Bomb Off")}
}#end of K
if(On){
    entity():setColor(255,0,0)
if(N!=0){N1=N}
E=entity(N1)
XYZ=O:aimPos()
E:applyForce((40*((XYZ-E:pos())+vec(0,0,50))-E:vel())*E:mass())
if(O:keyUse()&O:keyAttack2()){Spawn=1}else{Spawn=0}

}#end of On
else
{entity():setColor(0,255,255)}
