The question is this - can I buy an engine, develop a game based on it, and sell it in styme, of course, indicating in the credits data about the engine?
Yes. Even indicating in the credits is optional.
(Note that this is a GameMaker: Studio source file so you may need a license for that to create a standalone game, depending on target platform)