1998 300ex ticking

Just bought a 1998 300ex, its runs and rides great all the power is there but it has a loud ticking tapping noise coming from the top front of the motor at idle and acceleration. I’ve also noticed that smoke comes out of the gasket where motor meets the exhaust pipe. I’m not the most mechanically inclined person, any ideas what this is? And is it bad to continue riding? Bike has no issues with bogging down.

Attached Thumbnails

Click image for larger version

Name:	IMG_2876_1482593796838.JPG
Views:	N/A
Size:	668.7 KB
ID:	60961