Combining two scripts under one event

Hello guys and girls I hope everything is fine with you!

I'm working on a project which includes a Arduino UNO, PIR-sensor, wave shield and led lights.
Essentially we are making a thunderous cloud, so when the PIR-sensor register your presens we want the led lights to start simulating a thunder and sound to start.

But first of all we need to make the sensor work with the LED lights.
I've made the sensor work (yay!) and the LED lights blinking randomly (x2 yay!) but how in the name of Belzebub do I combine the scripts under one event?

So how do I make the LED lights blink randomly when someone walks infront of the PIR-sensor?

So time for some code:

PIR-sensor:
int ledPin = 13; // choose the pin for the light
int inputPin = 2; // choose the input pin (for PIR sensor)
int pirState = LOW; // we start, assuming no motion detected
int signal = 0; // variable for reading the pin status

void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare sensor as input
Serial.begin(9600);
}

void loop(){
signal = digitalRead(inputPin); // read input value
if (signal == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, HIGH); // turn light ON
if (pirState == LOW) { // we have just turned on
Serial.println("Active");
// We only want to print on the output change, not state
pirState = HIGH;
}
} else {

digitalWrite(ledPin, LOW); // turn light OFF

if (pirState == HIGH){
// we have just turned of
Serial.println("Inactive");
// We only want to print on the output change, not state
pirState = LOW;
}
}
}

LED lights that blinks randomly:
int ledRed = 6;
int ledGreen = 8;
int ledYellow = 9;
int ledBlack = 13;

void setup() {
pinMode (ledRed, OUTPUT);
pinMode (ledGreen, OUTPUT);
pinMode (ledYellow, OUTPUT);
pinMode (ledBlack, OUTPUT);
}

void loop() {
digitalWrite(ledRed, random(2));
digitalWrite(ledGreen, random(2));
digitalWrite(ledYellow, random(2));
digitalWrite(ledBlack, random(2));
delay(100);

}

I'm super stuck. It would be awesome if someone could sacrifice some time and help me.
Thank you in advance.

/Noob Neo

but how in the name of Belzebub do I combine the scripts under one event?

Step 1: Recognize what the two programs are currently doing.
Step 2: Define the requirements for the new program.
Step 3: Copy bits and pieces of the existing program to the new program, writing new code as required.

Step 4: get rid of any calls to delay ().

AWOL:
Step 4: get rid of any calls to delay ().

Unless you like unresponsive code. As to how to do that, we'll get back to you after:

delay(86400000UL);

Wow thank you for the quick answers!
Maybe I'm asking for too much here but since I'm a total newbie at this and under alot of time pressure could someone that really likes coding and that have time left over combine the codes so it works together?
I totally understand if you don't feel like doing it!

and under alot of time pressure

Homework's late, huh?

could someone that really likes coding and that have time left over combine the codes so it works together?

Apparently, you skipped right over step 2. Back up, jack. You can not do that.

PaulS:

and under alot of time pressure

Homework's late, huh?

could someone that really likes coding and that have time left over combine the codes so it works together?

Apparently, you skipped right over step 2. Back up, jack. You can not do that.

I'm a rebel like that.
I can offer you 100 rupies.

I can offer you 100 rupies.

To write a program for which there are no requirements. Don't blame me when you don't pass the course.

PaulS:

I can offer you 100 rupies.

To write a program for which there are no requirements. Don't blame me when you don't pass the course.

I do not longer believe in Murphy's law since I, in the hour of frustration acually made it to work.
I just combined the two scripts with each other, I know it's a cluster of newbieness:

int ledRed = 6;
int ledGreen = 8;
int ledYellow = 9;
int ledBlack = 13;
int ledPin = 13; // choose the pin for the light
int inputPin = 2; // choose the input pin (for PIR sensor)
int pirState = LOW; // we start, assuming no motion detected
int signal = 0; // variable for reading the pin status

void setup() {
pinMode (ledRed, OUTPUT);
pinMode (ledGreen, OUTPUT);
pinMode (ledYellow, OUTPUT);
pinMode (ledBlack, OUTPUT);
pinMode(ledRed, INPUT); // declare sensor as input
pinMode(ledGreen, INPUT); // declare sensor as input
pinMode(ledYellow, INPUT); // declare sensor as input
pinMode(ledBlack, INPUT); // declare sensor as input
Serial.begin(9600);
}

void loop() {
signal = digitalRead(inputPin); // read input value
if (signal == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, HIGH); // turn light ON
if (pirState == LOW) { // we have just turned on
Serial.println("dicks");
// We only want to print on the output change, not state
pirState = HIGH;
} else {

digitalWrite(ledPin, LOW); // turn light OFF

if (pirState == HIGH){
// we have just turned of
Serial.println("no dicks");
// We only want to print on the output change, not state
pirState = LOW;
digitalWrite(ledRed, random(2));
digitalWrite(ledGreen, random(2));
digitalWrite(ledYellow, random(2));
digitalWrite(ledBlack, random(2));
delay(100);

}
}
}

}