Player Code (Mostly just copy pasta)