It's pretty simple. You could use a common event and few variables. You really don't need a script to do this but if you want one, here it is:
[SIZE=2][COLOR=#0000ff][SIZE=2][SIZE=2][COLOR=black]class Game_Actor[/COLOR][/SIZE][/SIZE][/COLOR][/FONT]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=black]attr_accessor :lockpicking_level[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]attr_accessor :lockpicking_level_max[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]attr_accessor :lockpicking_exp[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]alias dargor_lock_actor_initialize initialize[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]def initialize[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] dargor_lock_actor_initialize[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] @lockpicking_level = check_lockpicking_level [/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] @lockpicking_level_max = 100[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] @lockpicking_exp = 0[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]end[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]def lockpick(lock_level)[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] #simple formula[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] success_rate = (@lockpicking_level*100)/lock_level[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] if rand(100) <= success_rate[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] @lockpicking_exp += 5[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] @lockpicking_level = check_lockpicking_level[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] # Success[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return true[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] else[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] # Failure[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return false[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] end[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]end[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]# Change lockpicking level[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]# I know the leveling "formula" is horrible[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]def check_lockpicking_level[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] case @lockpicking_exp[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] when 0...19[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return 1[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] when 20...39[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return 20[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] when 40...59[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return 50[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] when 60...79[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return 75[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] when 80...100[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return 100[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] else[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] return 1[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] end[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black] end[/COLOR][/FONT][/SIZE]
[SIZE=2][COLOR=black]end[/COLOR][/FONT][/SIZE]
[/COLOR][/SIZE][/SIZE]
It's a pretty simple code made in 5 minutes, at school using Near Fantastica's RGSS Scripter:p. I can't test this script right now but I will when I'll get back home.
How To Use:
1-Set up your door event.
2-Add a "Lockpick" choice
3-Add this script line in under the choice:
$game_actors[actor_id].lockpick(lock_level)
where actor_id is the id of the actor trying to lockpick the door, lock_level is the lock level of the door.
4-Add a conditional branch under the script line and put a scripted condition (4th tab):
$game_actors[actor_id].lockpick == true
5-When condition is met, show a message saying something like "Success!" and when the condition is not met, show a message saying something like "Failed..."
If you encounter some problems, tell me.
Hope you like it!
-Dargor