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!). It works fine in an unloaded block, loading the block when the program needs to run. Events are properly delivered after a server restart. Documentation is available here!