The Luacontroller is an advanced programmable component. You can simply code it in the language Mesecons uses itself: Lua! All the code runs in a sandbox, so it's completely safe (but I won't guarantee that for absolute certainty!). Documentation is available here!