One quite simple solution to the problem is to replace the hardcoded z-value of 0.3 used when calling perlin.noise(x, y, 0.3) with a seed that is generated on startup.
Another solution would be to in perlin.init() take three random values using math.random() and store them. Add these three random values to the x, y, z passed into perlin.noise().