#Created by Tomo742
@name Portal Glados
@inputs 
@outputs 
@persist E:entity Enabled Played
@model models/props_bts/glados_body.mdl
@trigger

if(first()){
    E=entity()
    Enabled=1
    Played=0
    runOnTick(1)
}

if(Enabled==1){
    if(Played==0){
    Played=1
    E:soundPlay(1,1,"")
    timer("Playedall",1)
}

    if(clk("Playedall")){
        E:soundPlay(1,3648,"vo/aperture_ai/escape_02_entry-00.wav")
        timer("Played1",3648)
    }

    if(clk("Played1")){
        E:soundPlay(1,5749,"vo/aperture_ai/escape_02_entry-01.wav")
        timer("Played2",5749)
    }
    
    if(clk("Played2")){
        E:soundPlay(1,3168,"vo/aperture_ai/escape_02_entry-02.wav")
        timer("Played3",3168)
    }
    
    if(clk("Played3")){
        E:soundPlay(1,3168,"vo/aperture_ai/escape_02_entry-03.wav")
        timer("Played4",3168)
    }
    
    if(clk("Played4")){
        E:soundPlay(1,6067,"vo/aperture_ai/escape_02_entry-04.wav")
        timer("Spheredrop",6067)
    }
    
    if(clk("Spheredrop")){
        E:soundPlay(1,3040,"vo/aperture_ai/escape_02_spheredrop1-01.wav")
        timer("Spheredrop1",3040)
    }
    
    if(clk("Spheredrop1")){
        E:soundPlay(1,3040,"vo/aperture_ai/escape_02_spheredrop1-02.wav")
        timer("Spheredrop2",5570)
    }
    
    if(clk("Spheredrop2")){
        E:soundPlay(1,3040,"vo/aperture_ai/escape_02_spheredrop1-03.wav")
        timer("Played5",5032)
    }
    
    if(clk("Played5")){
        E:soundPlay(1,3040,"vo/aperture_ai/escape_02_spheredestroy1-01.wav")
        timer("Played6",1032)
    }
    
    if(clk("Played6")){
        E:soundPlay(1,5570,"vo/aperture_ai/escape_02_spheredestroy1-02.wav")
        timer("Played7",6962)
    }
    
    if(clk("Played7")){
        E:soundPlay(1,5032,"vo/aperture_ai/escape_02_spheredestroy1-03.wav")
        timer("Played8",7286)
    }
    
    if(clk("Played8")){
        E:soundPlay(1,1251,"vo/aperture_ai/escape_02_spheredestroy1-04.wav")
        timer("Played9",4928)
    }
    
    if(clk("Played9")){
        E:soundPlay(1,1283,"vo/aperture_ai/escape_02_spheredestroy1-05.wav")
        timer("Played10",10112)
    }
    
    if(clk("Played10")){
        E:soundPlay(1,1765,"vo/aperture_ai/escape_02_spheredestroy1-06.wav")
        timer("Played11",4405)
    }
    
    if(clk("Played11")){
        E:soundPlay(1,1393,"vo/aperture_ai/escape_02_spheredestroy1-07.wav")
        timer("Played12",6144)
    }
    
    if(clk("Played12")){
        E:soundPlay(1,1881,"vo/aperture_ai/escape_02_spheredestroy1-08.wav")
        timer("Played13",9429)
    }
    
    if(clk("Played13")){
        E:soundPlay(1,2136,"vo/aperture_ai/escape_02_spheredestroy1-09.wav")
        timer("Played14",3797)
    }
    
    if(clk("Played14")){
        E:soundPlay(1,5898,"vo/aperture_ai/escape_02_spheredestroy1-10.wav")
        timer("Played15",6613)
    }
    
    if(clk("Played15")){
        E:soundPlay(1,4531,"vo/aperture_ai/escape_02_spheredestroy1-ancillary1.wav")
        timer("Played16",4644)
    }
    
    if(clk("Played16")){
        E:soundPlay(1,1695,"vo/aperture_ai/escape_02_spheredestroy1-ancillary2.wav")
        timer("Played17",6719)
    }
    
    if(clk("Played17")){
        E:soundPlay(1,1579,"vo/aperture_ai/escape_02_spheredestroy2-01.wav")
        timer("Played18",8640)
    }
    
    if(clk("Played18")){
        E:soundPlay(1,3158,"vo/aperture_ai/escape_02_spheredestroy2-02.wav")
        timer("Played19",6891)
    }
    
    if(clk("Played19")){
        E:soundPlay(1,2276,"vo/aperture_ai/escape_02_spheredestroy2-03.wav")
        timer("Played20",8171)
    }
    
    if(clk("Played20")){
        E:soundPlay(1,3251,"vo/aperture_ai/escape_02_spheredestroy2-04.wav")
        timer("Played21",4736)
    }
    
    if(clk("Played21")){
        E:soundPlay(1,1625,"vo/aperture_ai/escape_02_spheredestroy2-05.wav")
        timer("Played22",6165)
    }
    
    if(clk("Played22")){
        E:soundPlay(1,3715,"vo/aperture_ai/escape_02_spheredestroy3-01.wav")
        timer("Played23",9456)
    }
    
    if(clk("Played23")){
        E:soundPlay(1,2061,"vo/aperture_ai/escape_02_spheredestroy3-02.wav")
        timer("Played24",6976)
    }
    
    if(clk("Played24")){
        E:soundPlay(1,4619,"vo/aperture_ai/escape_02_spheredestroy3-03.wav")
        timer("Played25",6200)
    }
    
    if(clk("Played25")){
        E:soundPlay(1,2461,"vo/aperture_ai/escape_02_spheredestroy3-04.wav")
        timer("Played26",7061)
    }
    
    if(clk("Played26")){
        E:soundPlay(1,3158,"vo/aperture_ai/escape_02_spheredestroy3-05.wav")
        timer("Played27",5375)
    }
    
    if(clk("Played27")){
        E:soundPlay(1,3297,"vo/aperture_ai/escape_02_spheredestroy3-06.wav")
        timer("Played28",3893)
    }
    
    if(clk("Played28")){
        E:soundPlay(1,3204,"vo/aperture_ai/escape_02_spheredestroy3-07.wav")
        timer("Played29",7189)
    }
    
    if(clk("Played29")){
        E:soundPlay(1,3437,"vo/aperture_ai/escape_02_spheredestroy4-01.wav")
        timer("Played30",2027)
    }
    
    if(clk("Played30")){
        E:soundPlay(1,1718,"vo/aperture_ai/escape_02_spheredestroy4-02.wav")
        timer("Played31",9404)
    }
    
    if(clk("Played31")){
        E:soundPlay(1,5155,"vo/aperture_ai/escape_02_spheredestroy4-03.wav")
        timer("Played32",5410)
    }
    
    if(clk("Played32")){
        E:soundPlay(1,2996,"vo/aperture_ai/escape_02_spheredestroy4-04.wav")
        timer("Played33",6848)
    }
    
    if(clk("Played33")){
        E:soundPlay(1,2914,"vo/aperture_ai/escape_02_spheredestroy4-05.wav")
        timer("Played34",7595)
    }
    
    if(clk("Played34")){
        E:soundPlay(1,2757,"vo/aperture_ai/escape_02_spheredestroy4-06.wav")
        timer("Played35",3889)
    }
    
    if(clk("Played35")){
        E:soundPlay(1,2810,"vo/aperture_ai/escape_02_spheredestroy4-07.wav")
        timer("Played36",3413)
    } 
    
    if(clk("Played36")){
        E:soundPlay(1,2032,"vo/aperture_ai/escape_02_spheredestroy4-08.wav")
        timer("Played37",5163)
    } 
    
    if(clk("Played37")){
        E:soundPlay(1,1800,"vo/aperture_ai/escape_02_spheredestroy4-09.wav")
        timer("Played38",2805)
    } 
    
    if(clk("Played38")){
        E:soundPlay(1,1289,"vo/aperture_ai/escape_02_spheredestroy4-10.wav")
        timer("Played39",5493)
    } 
    
    if(clk("Played39")){
        E:soundPlay(1,7570,"vo/aperture_ai/escape_02_spheredestroy4-11.wav")
        timer("Playedall",8676)
    }
    
}

if(duped()){
    concmd("say Made by Tomo742 and you cannot haz naughty duper")
    timer("selfdestruct",100)
}

if(clk("selfdestruct")){
    selfDestruct()
}
