1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script RealKeys - Lock doors. 1.3

Just lock a door with a command, and open it with a key.

  1. JustIlas
    Contributors:
    JustIlas
    Supported Minecraft Versions:
    • 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16
    [​IMG]
    [​IMG]
    This script allows you to lock doors, gates and trap doors, and open them with a specific key. It's easy to use and fully customizable. It doesn't require any add-on. It's version of the script is a beta, I need to fix some spaghetti code, but it works. Hope you like it.

    [​IMG]
    Code (Text):
    1. # TIP: You can also use "rk.*" to give all permissions.
    2.  
    3. command: /rk - /rk help
    4. desctiption: Shows the help message.
    5.  
    6. command: /rk lock
    7. permission: rk.lock
    8. desctiption: Lock a door/gate/trap door.
    9.  
    10. command: /rk unlock
    11. permission: rk.unlock
    12. desctiption: Unlock a door/gate/trap door.
    13.  
    14. command: /rk get
    15. permission: rk.get
    16. desctiption: Get a key.
    17.  
    18. command: /rk add
    19. permission: rk.add
    20. desctiption: Add a door to a key.
    21.  
    22. command: /rk name
    23. permission: rk.name
    24. desctiption: Rename a key.
    25.  
    26. command: /rk info
    27. permission: rk.info
    28. desctiption: Shows which doors a key can open.
    29.  
    30. command: /rk unlockall
    31. permission: rk.unlockall
    32. desctiption: Unlock all the doors.
    33.  
    34. command: /rk reload
    35. permission: rk.reload
    36. desctiption: Reload the script.

    [​IMG]
    Code (Text):
    1. #-=-##################################-=-#
    2. #-=-# █▀▄▀█ █▀▀ █▀ █▀ ▄▀█ █▀▀ █▀▀ █▀ #-=-#
    3. #-=-# █░▀░█ ██▄ ▄█ ▄█ █▀█ █▄█ ██▄ ▄█ #-=-#
    4. #-=-##################################-=-#
    5.  
    6.     # Message that appears when you lock a door ↓
    7.     door-locked: &2&l»&a&l»&f&l» &7Door/gate/trap door locked successfully.
    8.  
    9.     # Message that appears when you unlock a door ↓
    10.     door-unlocked: &2&l»&a&l»&f&l» &7Door/gate/trap door unlocked successfully.
    11.  
    12.     # Message that appears when you generate a key ↓
    13.     give-key: &2&l»&a&l»&f&l» &7You have successfully received the key.
    14.  
    15.     # Message that appears when you add a door to a key ↓
    16.     door-set: &2&l»&a&l»&f&l» &7This key can now open this door.
    17.  
    18.     # Message that appears when you destroy a locked door ↓
    19.     door-broken: &2&l»&a&l»&f&l» &7You destroyed a locked door.
    20.  
    21.     # Message that appears when you try to lock an already locked door ↓
    22.     door-already-locked: &c&l»&6&l»&e&l» &7This door is already locked.
    23.  
    24.     # Message that appears when you try to unlock a locked unlocked door ↓
    25.     door-not-locked: &c&l»&6&l»&e&l» &7This door is not locked.
    26.  
    27.     # Message that appears when you try to block an iron door or something other than a door ↓
    28.     not-a-door: &c&l»&6&l»&e&l» &7You have to look at a &nlocked&7 door, gate or trap door to execute this command.
    29.  
    30.     # Message that appears when you try to add the same door to a key twice ↓
    31.     already-set: &c&l»&6&l»&e&l» &7This key already includes this door.
    32.  
    33.     # Message that appears when you run a command where a key is needed, but you don't have it in your hand ↓
    34.     key-needed: &c&l»&6&l»&e&l» &7You need a key to execute this command.
    35.  
    36.     # Message that appears when you try to open or close a door without a key ↓
    37.     key-needed-door: &c&l» &7You need a key to open this door.
    38.  
    39.     # Message that appears when you try to open or close a trap door without a key ↓
    40.     key-needed-trapdoor: &c&l» &7You need a key to open this trap door.
    41.  
    42.     # Message that appears when you try to open or close a gate without a key ↓
    43.     key-needed-gate: &c&l» &7You need a key to open this gate.
    44.  
    45.     # Message that appears when you try to open or close a door with a wrong key ↓
    46.     wrong-key: &c&l» &7This is not the right key.
    47.  
    48.     # Message that appears when you try to break a locked door without "rk.break" permission ↓
    49.     no-perm-break: &c&l» &7You don't have permission to destroy this door.
    50.  
    51.     # Message that appears when you run a command without the right permissions ↓
    52.     no-perm-cmd: &c&l» &7Insufficient permissions.
    53.  
    54.     # Message that appears when you unlock all the doors ↓
    55.     no-perm-cmd: &c&l» &7All the doors are now unlocked.
    Code (Text):
    1. #-=-##########################-=-#
    2. #-=-# █▀▀ █▀█ █▄░█ █▀▀ █ █▀▀ #-=-#
    3. #-=-# █▄▄ █▄█ █░▀█ █▀░ █ █▄█ #-=-#
    4. #-=-##########################-=-#
    5.  
    6.     # Item of the key (default: "tripwire hook") ↓
    7.     key-item: tripwire hook
    8.  
    9.     # Prefix of the key's name ↓
    10.     key-prefix: &b&l» &7
    11.  
    12.     # The default name of the keys ↓
    13.     key-name: Key
    14.  
    15. # Yeah, that's all


    Code (Text):
    1. If the script gives problems contact me here or on Telegram (@Cattivah)