code for one button/material change works, but now multiple buttons?

What error do you get? Have you created multiple ui buttons and have them set to call this code on different objects?

Also, please use code tags: