@name AutoShoot
@inputs 
@outputs 
@persist S

interval(1)

R = rangerOffset(10000, owner():shootPos() + (owner():eye() * 55), owner():eye())

if (R:entity():isAlive() & !S) {
    S = 1
    concmd("+attack")
} else {
    S = 0
    concmd("-attack")
}