Possible to have Checkboxes to fire off actions?

Is there any possibility to have checkboxes to run commands from code scrips or templater commands when checked / unchecked?