Yes you can define a function, and then pass it as the 'FunctionClick' parameter in your button defintion.
If you want to suspend the game from running until the button is pressed, you can use a simple variable and a while loop in the main function...
var start_game = 0;
function main()
{
while(start_game==0){wait(1);}
...
// start game bla bla
}
Then your function attached to the button will simply set this variable to 1.