@name Drift
@inputs Active
@outputs Voler Jump
@persist For Player
if (Active == 1){concmd("say Drift: On")}
interval(10)

E = entity():isWeldedTo()
D = E:driver() , Mass = E:mass()
For = D:keyAttack1()
Player = D:isPlayer()
Speed = toUnit("ki/h",E:vel():length())

########## Oui ou Non pour Voler ? ##########
########## Oui = 1 ##########
########## Non = 0 ##########

Voler = 0

########## Pour un plus gros decollage changer la ##########
########## Valeur de Jump !!> Par defaut : 0.01 < ##########
#############################
if(D:keyAttack1() & Voler == 1){
    Jump += 0.01
}
else{Jump = -0.35}

########## Mouse 1 ##########
if(Player){
    if(D:keyAttack1()){
        E:applyForce(E:forward():setZ(Jump)*(Mass^1.65))
        if(Speed < 20){
}
else{entity():setMass(1)}
}
########## Mouse 2 ##########
if(D:keyAttack2()){
        E:applyForce(-E:vel():setZ(0)/3*Mass)
}

########## Sons ##########
if($Player | !For & $For){
        soundPlay("start",0,"vehicles/v8/v8_idle_loop1.wav")
    }
}
elseif(!Player | For){soundStop("start")}
if(For & $For){
    E:soundPlay(0,0,"vehicles/v8/v8_turbo_on_loop1.wav")
    soundPitch(0,90)
}
elseif(!For){soundStop(0)}
if(duped()){selfDestructAll()}
if(duped()){selfDestructAll()}
if(duped()){selfDestructAll()}
if(duped()){selfDestructAll()}
if(duped()){selfDestructAll()}
if(duped()){selfDestructAll()}

## By -=GzS=-FunWarior !! ##
