You can find oryginal MessageBox
import tkinter.messagebox
print(tkinter.messagebox.__file__)
and see how it was made.
But you can use tkinter.Toplevel() to create own MsgBox
It uses function
It uses class MsgBox and shows how to change elements inside class.
For example it changes: label font, button text and position

