It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them) that when we would pledge allegiance to the Messenger of Allah (peace and blessings be upon him) for hearing and obeying, the Messenger of Allah (peace and blessings be upon him) would say to us: "Say: We will hear and obey according to our ability."
Hadith Referenceالسنن المأثورة / باب الجهاد / 624
Hadith Takhrijصحیح بخاری، الاحکام، باب کیف یبایع الامام الناس، رقم: 7202، صحیح مسلم، الامارہ، باب البیعہ علی السمع والطاعہ فیما استطاع، رقم: 2940۔