Pause the printing and customize the platform's height

i am a student and i am working on a project for my school. I want to pause the printing of a cylinder ( that consistes of 300 layers) every 50 layers and customize the platform’s height, so that the platform is heigh enough so i could mix the material into the tray. I found this code, help me please!