Need a code because I'm a very newbie in arduino programming

You will need another power supply for the relay coils. The Mega cannot power relay coils.

What wil be sending data through the Bluetooth? The serial input basics tutorial has good information receiving and parsing serial data.