@name Cassette Player By Ammut
@inputs Color:vector Dist
@outputs T G
@persist H
@trigger 
interval(1)
  if(Dist==0){T=0}
    if(Dist>0){T=1}
if(first()){T=0 G=1}
if(Color==vec(255,0,0)){
    if(T==1){
        if(G==1){

        soundPlay(1000,1000,"music/hl2_song25_teleporter.mp3")
    G=0}
}}
  

if(T==0){
soundPurge()
G=1
H=1
}


  if(Dist==0){T=0}
    if(Dist>0){T=1}

if(Color==vec(0,255,0)){
    if(T==1){
        if(H==1){

        soundPlay(1000,1000,"music/hl2_song31.mp3")
    H=0}
}}
