tl;dr: No, you can not use that script and sell your game.
The answer can be found in the license text of the CC-BY-NC-SA. This is version 3.0. You did not specify the license version. This answer assumes 3.0. When the script you are using uses a different license version, parts of this answer may be inaccurate. But the versions differ mostly in wording, not in spirit, so the tl;dr would likely be the same. Also, I am not a lawyer. This is a layman interpretation. Do not consider this leagal advise.
First of all, Creative Commons themselves advise against using CC licenses for software. They were designed for creative media like music or art. So some parts of it are unclear regarding how to apply them to software. Some people use the CC-BY-SA-NC for software regardless, because it's one of the few reasonably popular standard licenses with a "free for non-commercial use" concept.
The License section 3 gives you the right to adapt and redistribute the work. This is what you want to do. So far everything is fine. But later sections puts certain restrictions on it, for example the section 4c:
You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation.
That's the Non-Commercial clause, and it means no, you are not allowed to use the script in any project which makes you money. Selling the game voids all your rights to use the script. That means you no longer have permission to use the script at all.
Another clause which might be problematic to you is 4b, the ShareAlike clause:
You may Distribute or Publicly Perform an Adaptation only under: (i) the terms of this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable License").
That means the script must be redistributed under the same license conditions. Whether that means that your whole game must be CC-BY-NC-SA depends on whether a game which uses the script is an "Adaption" or a "Collection". The license defines these terms, but the definition is IMO not really applicable to software. An "Adaption" would be subject to this clause, a "Collection" would not. This ambiguity is one reason why one should not use CC licenses for software.
By the way, many people who create software libraries under such "inconvenient" license terms do that as a promotion measure. When you would like to use their work in a commercial project, they might be willing to provide it to you under more convenient license conditions if you pay them a license fee. You might want to contact them and check out if they can be negotiated with.
Paying for 3rd party components is almost always cheaper than developing it yourself. In those cases where the component is not, that's usually either because it is unsuitable or because of the work it takes to integrate it with your own components. But you have already evaluated that it's suitable and sunk the cost to integrate it, so it doesn't matter.