@name Splitscreen Lua
@inputs Num:wirelink
@outputs 
@persist 
@trigger 

#input
N0 =   Num["0",number]
N1 =   Num["1",number]
N2 =   Num["2",number]
N3 =   Num["3",number]
N4 =   Num["4",number]
N5 =   Num["5",number]
N6 =   Num["6",number]
N7 =   Num["7",number]
N8 =   Num["8",number]
N9 =   Num["9",number]
Slash= Num["/",number]
Astrix=Num["*",number]
Minus= Num["-",number]
Plus=  Num["+",number]
Enter= Num["enter",number]
Del=   Num[".",number]

P="+"
N="-"
S="sp_"
For=S+"forward"
Bac=S+"back"
Slef=S+"left"
Srit=S+"right"
Lup=S+"turnup"
Ldn=S+"turndown"
Llef=S+"turnleft"
Lrit=S+"turnright"
Jump=S+"jump"
Attack=S+"attack"

if(N0){concmd(P+Jump)}elseif(changed(N0)){concmd(N+Jump)}
if(N1){concmd(P+Slef)}elseif(changed(N1)){concmd(N+Slef)}
if(N2){concmd(P+Bac)}elseif(changed(N2)){concmd(N+Bac)}
if(N3){concmd(P+Srit)}elseif(changed(N3)){concmd(N+Srit)}
if(N4){concmd(P+Llef)}elseif(changed(N4)){concmd(N+Llef)}

if(N6){concmd(P+Lrit)}elseif(changed(N6)){concmd(N+Lrit)}

if(N8){concmd(P+For)}elseif(changed(N8)){concmd(N+For)}
if(N9){concmd(P+Ldn)}elseif(changed(N9)){concmd(N+Ldn)}
if(Astrix){concmd(P+Lup)}elseif(changed(Astrix)){concmd(N+Lup)}
if(Enter){concmd(P+Attack)}elseif(changed(Enter)){concmd(N+Attack)}
