Believe it or not, there isn't any RNG in the pumpkin minigame—it's all based on the timing of your button/input press and the carving shape that's closest to the center of the window represented by the indicator at the top.