e^x^7 IS NOT a PDF since the area (integral) under that function need to be 1 (probability, isn't it?).
Anyway, there are several ways of generating random values from an arbitrary PDF, and the one that suits your case (assume that it will be a PDF) need to use inverse functions and CDF
if y is the CDF, which has a known inverse function
x = f(y)
where f is the inverse function of the CDF
returns a random point according to the PDF tyou want,