Police: Student threatens to take gun to school