I wish to make something that will generate around 500 random results drawing 6 numbers from 49 (i.e a lottery machine)

Then I wish to check 8 fixed selected numbers against those results to show the hit rate, ie number of balls predicted correctly from a selection of 8,

Is there any script online that will do this for me.