Combining 2 codes of an arduino car

Yes, but I want this to happen only when I'm not connected to the bluetooth. The servo and the sensor must be inactive while the bluetooth is connected.