Actually got the battery script to work