-- Simple button click handler click_count = 0 function onButtonClick(event) click_count = click_count + 1 local button = event.current_element button.inner_rml = "Clicked " .. click_count .. " times!" print("Button clicked! Count: " .. click_count) end