How to trigger script once?
I have added another variable  to save the state and toggle it every time, 'Done' indicates whether you have subtracted or not during this pulse :

def main():
    cont = bge.logic.getCurrentController()
    own = cont.owner
    Ray = cont.sensors["Ray"]
    Bool = own["Bool"]
    Done = own["Done"]

    if Ray.positive and Bool and not Done:

        own["Done"] = True
        print("have nothing to do") 
    elif not Bool :
        own["Done"] = False

main()