adsense code showing on random post thumb

Bit hard to understand exactly what you want to do as the grammar isn’t the best but i assume you want to return false for your Adsense widgets (using the code you linked to) when random posts thumbnail” plugin executes?

You could add a check for the function your random posts thumbnail plugin uses so the widget doesn’t execute in that case.

Not sure what plugin you’re using though as you haven’t linked to it or named it specifically.