Originally posted by Antanico edit the MODSET.505 in the following way as you missed a part in the second line:
[OPEN_DEBUG_MENU]
[SW_DEBUG_MENU EN]
[DEBUG_MODE EN]
[DEBUG_MODE DIS]
[RELEASE_AGING]
[SCRIPT_EN_MODE EN]
[SCRIPT_EN_MODE DIS]
...
I would not run that script.
"RELEASE_AGING" starts a sequence that artificially ages the shutter.
Also, even if the script had been started, it would have disabled the debug menu again.
The only two entries needed to open the debug menu are
[DEBUG_MODE EN]
[SCRIPT_EN_MODE EN]
Have a look at the respective
Pentax Hack page.
It will tell you, among other things, that the base filename for the K-5 is not "MODESET" and so far unknown.
Just out of interest: Why do you want to go into the debug menu? As a K100D user I found it useful to adjust the AF calibration but K-5 users can do that without the debug menu. So I'm interested what the motivation is for a K-5 user.