how to specify if a button is in false mode in script
Just put not in the if.

from bge import logic
def main():
    cont = logic.getCurrentController()
    own = cont.owner

    right = cont.sensors ["right"]
    left = cont.sensors ["left"]
    gas = cont.sensors ["gas"]

    if not gas.positive:
        if not left.positive:
            if not right.positive:
                own ["rotation"] += 0.1
    else:
        own ["rotation"] = 0