Fading LED with multiple sensors issues

this works perfectly! Thanks for all the advice!

int pin = 7;
unsigned long duration;
int rep = 0;
int ledPin = 13;
int ledPin2 = 12;
int ledPin3 = 11;
int ledPin4 = 4;
int sensorValue = 0;
int val = 0;
int count = 0;
int value = 0;

void setup()
{
pinMode(sensorValue, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);
Serial.begin(9600);
}

void getAdistance(){
pinMode(pin, OUTPUT);
delay(500);
digitalWrite(pin, LOW);
delayMicroseconds(5);
digitalWrite(pin, HIGH);
delayMicroseconds(5);
digitalWrite(pin, LOW);
pinMode(pin, INPUT);
duration = pulseIn(pin, HIGH);
}

void fadeIn(int outPin)
{
for(int value = 4; value <= 250; value++)
for(int rep = 0; rep <= 10; rep++)
{
digitalWrite(outPin, HIGH);
delayMicroseconds(value);
}
}

void fadeOut(int outPin)
{
for(int value = 4; value <= 250; value++)
for(int rep = 0; rep <= 10; rep++)
{
digitalWrite(outPin, LOW);
delayMicroseconds(value);
}
}


void loop(){
{
getAdistance();
Serial.println(duration, DEC);
val = duration;
{
if(duration < 2000)
{
fadeIn(ledPin2);
}
if(duration < 1000)
{
fadeIn(ledPin3);
}
if(duration >= 2000)
{
fadeOut(ledPin2);
}
if(duration >= 1000)
{
fadeOut(ledPin3);
}
}
}

{
sensorValue = analogRead(0);
Serial.println(sensorValue, DEC);
delay(500);

if((sensorValue) == 0){
pinMode(0, INPUT);
digitalWrite(ledPin, LOW);
delay(5);
}

else if((sensorValue) > 1){
pinMode(0, INPUT);
fadeIn(ledPin);
delay(500);
}
}

{
sensorValue = analogRead(1);
Serial.println(sensorValue, DEC);
delay(500);

if((sensorValue) == 0){
pinMode(1, INPUT);
fadeOut(ledPin4);
delay(5);
}

else if((sensorValue) > 1){
pinMode(1, INPUT);
fadeIn(ledPin4);
delay(500);
}
}
}