Rewritten lever script thanks to @ninjalulz