Okay so there are generally two ways to do this.
1. (
Very difficult, requires lot of additional coding )
Host Your Own Server - The first option is to buy a server from a hosting service. After you set it up, you could connect it to your game using one of
these extensions. However you might need to create your own additional blocks depending on the type of game your making.
2. (
Recommended, much easier )
Use A Third Party Service - Use a third party service to handle the multiplayer, accounting, and leader-boards for you. Then ask someone from the Stencyl community to make it compatible with Stencyl.
I'd go with the second option. Unless your a huge company with hundreds of programmers, its usually better to get a service to handle the server connection and management. Just hire somebody to make the Stencyl blocks from the service. Off the top of my head, I could think of a dozen companies that offer this. A popular one is
AppWarp . There is also
https://playerio.com/ but I'm not sure if their service has a Haxe API. Just a browser search and you'll find plenty of results. So do some research of the service that works best with your budget then post back here the service you want a Stencyl extension for. I personally can't help with the coding of the extension since I still have a lot to learn in Haxe

. But I'm sure mdotedot could offer some assistance. Or Squeeb or robin. Its pretty simple to create the blocks once you get the source code from the company. Best of luck!