Construct 2 has no direct support for scripting, although it's possible to create modules with JavaScript. There's documentation on how to do this on Scirra's website. A link to the documentation can be found here: Official C2 SDK documentation
As for if-else statements, C2 does have them.