It’s not really developped to be done that way, but you can still use C++ in your game (for native game) or JS (for HTML5 games). There’s a special type of event that allows you to enter code.
Ideally, some intermediate scripting language should be added for those who don’t want to use either c++ or JS, for example Lua. There are C/C++ Lua bindings and there is Lua.js for integrating Lua code into HTML5 software.