I tested your code with a similar setup (using a button and an LED with a Maestro), and it worked. Specifically, I followed the setup for connecting those two peripherals to the Maestro as described in the "Attaching Servos and Peripherals" section of the Maestro user's guide. I see a few things that could be the issue: improper channel settings, insufficient or no power supplied to peripherals (button and LED), and incorrect connections.
1) Can you verify that your button is connected on channel 0, and channel 0's mode is set to "Input" under the "Channel Settings" tab of the Maestro Control Center?
2) If you have a multimeter available, could you measure the voltage for both peripherals (button and LED) to see if they are powered?
3) Can you post pictures of your setup that show all your connections?
By the way, while testing you code, I encountered an overflow error. It looks like in your first
begin repeat code block an extra value (1) is added to the stack before calling your
frame subroutine, and it is not consumed during the runtime of your script. The extra value keeps adding to the stack with each button press, resulting in the stack overflow error. I recommend removing those extra 1's in that code block.