Partially working hook script.