27:3 "Judas saw He was condemned" - I believe Judas thought that
he was giving Jesus a nudge to reveal Himself as conquering
Messiah. Having Jesus actually executed was not what Judas
thought would happen.
Judas was there when Jesus was taken to Pilate, waiting for
the Messiah to reveal the wrath of God against the vile Romans.
But also, forgiveness was available - Jesus called him "friend".