change delay on pir sensor

anyone can help me ?
how to change delay on my script.

delay pir sensor always crash with ldr sensor.

thank’s be-4

changeleddelayonpir.ino (1.95 KB)

//------------alternative to change delay?-----
//--------------- variabel ldr-------------------
const int Pinled = 8;
int valueLDR;
//--------------- variabel pir-------------------
int ledpir = 13;
const int ReadPir = 2;

void setup() {
Serial.begin(9600);
//SET PIN (OUTPUT/INPUT)
//------------------LDR
pinMode(Pinled,OUTPUT); // Set pin 8 → output led from LDR sensor
pinMode(A0,INPUT); // Set pin A0 → input [pir]
//------------------------------------
//------------------PIR
pinMode(ledpir, OUTPUT); //------ [led]set pin output for [pir]
pinMode(ReadPir, INPUT); //------ set pin INPUT for [pir]
//------------------------------------
}
void loop() {
//------------------------------------------------------------------------
{
valueLDR=analogRead(A0);
if (valueLDR<100)
{digitalWrite(Pinled,HIGH);}
else {digitalWrite(Pinled,LOW); }
}
//------------------------------------------------------------------------
{
int value= digitalRead(ReadPir);

if (value == HIGH)
{
digitalWrite(ledpir, HIGH);
delay(10000);
digitalWrite(ledpir, LOW);
}
else {digitalWrite(ledpir, LOW);}
}
//------------------------------------------------------------------------
}