I don't know why it doesn't work for you, the script is running fine on my end. However, it doesn't trigger the lever animation, so here's the complete version which set's the mixture and also moves the lever in the virtual cockpit. Of course you need to change the button numbers to match your hardware:
-- Engine 1 cutoff switch
create_switch(15, "sim/flightmodel/engine/ENGN_mixt", 0, 1, 0)
create_switch(15, "ixeg/733/fuel/fuel_start_lever1_act", 0, 1, 0)
-- Engine 2 cutoff switch
create_switch(17, "sim/flightmodel/engine/ENGN_mixt", 1, 1, 0)
create_switch(17, "ixeg/733/fuel/fuel_start_lever2_act", 0, 1, 0)
Maybe it's a copy&paste problem with the forum code function, so I have also attached my script (again, using my button numers that you need to change).
cutoff.lua