Just count the balls on playfield.
Each time you create a ball If BallsOnPlayfield < 6 Then (create your ball) BallsOnPlayfield = BallsOnPlayfield +1
Each time a ball drains BallsOnPlayfield = BallsOnPlayfield -1
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?