Optimized change character script