IF the robots would be able to destroy the humanity, they'll really advanced AI. They would be able to think, act in different ways how they treat people etc. And to create that, it need a human behind all of it. Because, robots are programmed to DO something from the codes. And they need mathematics to complete cetern 'quests'/excutiton' to make it happend. But they can't, because we're the one who are controlling it and programming it. If we say that robots may hurt us, they might do it, because we PROGRAMMED it like that. It's all about programming and advanced shit. And it can only be done by a human who knows to how code/programming, like such advanced stuff etc blah blah. xD
Thou I think there will be SOMEONE, SOMENDAY making this into a reality.
But i'm not sure when, it would take time to make something advanced, like this.