It will pay to wait.
To pay attention.
Does the word "pay" mean the same thing in the above two sentences?
different meanings