Hey, sorry for the late reply
I picked most of the script from here
And then the HeatMap script from here