Is it possible to modify hardcode from my program?

Like make a textbox called Code and if you write:

if txtbox.text = "hello" then
msgbox("hi")
end if

it will run that code or delete another section like delete this:

if txtbox.text = "hello" then
end
end if

And replace it.

I want to make a program where u can modify the code i write.