Formal:
* Obrigado, senhor. (This is the most common and formal way to say "Thank you, sir.")
* Muito obrigado, senhor. (This is even more formal and means "Thank you very much, sir.")
Informal:
* Obrigado, meu senhor. (This is less formal and means "Thank you, my sir.")
* Valeu, senhor. (This is very informal and means "Thanks, sir.")
Note: The use of "senhor" (sir) is appropriate when addressing a man with respect, especially someone older or in a position of authority.
You can also use the informal "Obrigado, amigo" (Thank you, friend) or "Obrigado, camarada" (Thank you, comrade) if you are comfortable being informal with the person.