The reason I want to use UDK is because I want to use a good game engine for old PCs and also its tools are powerful and UDK gives me what I want but that does not mean that godot is bad but I tried UDK and I like it more than godot and my games are 3D
But I don't know if I use Adobe Flash Pro, for example, version CS5.5 to use Scaleform, is it legal because Adobe has stopped selling it?
"But I don't know if I use Adobe Flash Pro, for example, version CS5.5 to use Scaleform, is it legal because Adobe has stopped selling it?" I already said NO. Not unless you already purchased a license when Adobe sold it. Software does not become free just because it is no longer sold.
(Some people invented the term "abandonware" for this case, and argue they have some right to use abandoned software. You can read about the controversy and form your own ideas. But you should realise that software companies absolutely REJECT the idea of abandonware, and they can probably afford better lawyers than either of us).