The following is what is said before a person gives testimony:
Do you swear or affirm that the testimony you are about to give is the truth, the whole truth, and nothing but the truth so help you God or under the pains and penalties of perjury?
It allows for those who do not want to swear (they can affirm), and ensures that the person swearing or affirming is aware of the penalties for lying.