@name Thinking with Time Machine Chip ~ Cenn
@inputs Record Play Reset
@outputs T 
@persist F:string H:vector Pos:array OPos:vector J:number Potato Potato2 B:array Ang:array Cro:array OCro:number
@persist CC HH:entity
@trigger 
if(owner():lastSaid()=="!c"){
   # concmd("say ~~Restarting my fucking e2~~")
timer("reset",2000)
}
if(clk("reset")){reset()}
holoSetPose(1,"move_scale",1)
 holoSetPose(1,"move_x",90)
holoSetPose(1,"move_yaw",180) 
if(first()){
    
    F = owner():model()
holoCreate(1)
holoModel(1,F)
HH:propDelete()
HH = propSpawn("models/props_borealis/bluebarrel001.mdl",holoEntity(1):pos() + vec(0,0,30),1)
HH:parentTo(holoEntity(1))
HH:setAlpha(0)
Potato2 = 1
#holoAlpha(1,0)
T = 0
}
if(owner():isCrouch()){
    CC=1
}else{CC=0}
runOnTick(1)
if(Record==1){
if(Play==0){
if(Potato2==1){
Potato = 1
}
    T = T + 1
    H = owner():pos()
    A = owner():angles()
    Pos:setVector(T,H)
    Ang:setAngle(T,A)
    Cro:setNumber(T,CC)
    
}
}
if(changed(T)){
    if(Play==0){
B:setNumber(1,T)

}
}
if(Play==1){
    if(Record==0){
 holoAlpha(1,255)
if(Potato2==1){
Potato = 1
}
T = T + 1
OPos=Pos:vector(T)
OAng=Ang:angle(T)
OCro=Cro:number(T)
holoPos(1,OPos)      
holoAng(1,OAng)

     if(OCro==1){
    holoAnim(1,14)}
    if(OCro==0){
    holoAnim(1,210)}

    }
}
HH:setPos(holoEntity(1):pos()+ vec(0,0,30))
if(clk("moveanim")){

  }

#[if(Potato==1){T = 0
Potato2 = 0
Potato = 0}
]#
if(B:number(1)<T){T=0}
if(Reset==1){reset()
}
