After days of searching I've finally found a solution! In Mac there is no need of a script, all that you need is the proper Build System.
This one for C files:
"cmd": ["bash", "-c", "gcc '${file}' -o '${file_path}/${file_base_name}'&& open -a Terminal.app '${file_path}/${file_base_name}'"]
And this one for C++ files:
"cmd": ["bash", "-cpp", "g++'${file}' -o '${file_path}/${file_base_name}'&& open -a Terminal.app '${file_path}/${file_base_name}'"]
Now, when I press Cmd+B, a new Terminal window opens and my file runs, and of course it accepts input from the user, which sublime text console doesn't...
Simple and easy! All the credits to this guy: https://stackoverflow.com/a/18562836/4359229