Hi,
this is not hard to implement. You will need one value for storing the information. Let's say it's a value called password.
Wou would create each button as an object and under every button you would have action adding the current character to the value's string.
 Values["password"].String = Values["password"].String .. character
 
On the delete button you would remove the last character
 Values["password"].String = string.sub(Values["password"].String, 1, -2)
 
And on the cancel you would clear the whole value
 Values["password"].String = ""
 
Then whenever you need it you just compare the value with your password
 if Values["password"].String == "4587" then
  startAction("Scenes[scene_name].SceneActions[action_name]")
end
 
You also need to figure out displaying the numbers. You could probably use four 10frames animations. Each frame a number from 0 to 9. You could set the current displayed frame based on the pressed button and basedon the number of characters in the string. 2 characters means second slot - second animation.
 ActiveAnimation["slot01"].FirstFrame = 2
ActiveAnimation["slot01"].LastFrame = 2
 
I suppose you could achieve it without coding either but it's just simpler to use the code.