Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Card Swipe Security database (Made specifically for SCP) (Updated and improved version of Dustpuppy's system)

Recommended Posts

IMAGES COMING SOON Hello! This is my security doorcontrol system I built. It used to be the code from Dustpuppy's program, but I learned off of it and built it up to be more advanced and better!


So backstory: I was getting into Open computers when I discovered the open security mod, but I didn't know lua. so I looked on this website and found Dustpuppy's program. It was perfect! But my needs grew, and I added on more functions to the cards (Armory access level, departments, goi and mtf buttons and such), and I even upgraded the actual door system. In total: this is what this new system supports:

  • Two different card database types: One that works on normal open os, and a ported version for MineOS.
  • Settings for Staff, GOI, MTF, Level, Armory Level, Department, Blocked, Intercom, and Security
  • Two door control types: One is for a single door and supports normal redstone, rolldoor, bundled redstone, and doorcontrol, and a Multidoor, that can control any amount of doors from a single computer
  • An automatic setup command that works by running a pastebin command (will be down below)
  • Auto Update system! (you have to send a network message through another computer to update all doors. Prolly not necessary)
  • Easy setting edits: It saves all settings in a .txt file in the same drive, so you can edit it after install by typing edit doorSettings.txt (or something like that)


Video tutorial. NOTICE: This is before some of the extra stuff I added, like the automatic door setup command. You can send me any questions you have in the comments.


----Server: This has to be running all the time, as it receives the door signals and tells them to open or not to. The server has to be on when editing card settings, or the server will not receive them. Needs a modem and an internet card to run, and a minimum of tier 2 computer.

    server.lua: https://pastebin.com/0DC4wQVU

----Database: This is where you edit the accounts and write the cards. There are 2 types, so make sure you choose the correct one!!! Requires a modem and card writer connected to it, and a tier 3 computer and highest specs if you can! I recommend putting MineOS one on a server rack with 4 tier 3.5 memory modules, but the OpenOS one is lighter.

    OpenOS: You need to add both these programs to the drive. Name the GUI one gui.lua

        database.lua: https://pastebin.com/SYQEWNpg (Fixed code)

        gui.lua: https://pastebin.com/sSprBkir

     MineOS: Much sleeker and faster and basically better in every way. The database is available in the AppStore of MineOS and installs all necessary dependencies for you, but if you do it manually, you will still have to install the serialization library by user cadergator10 on there. Its just the OpenOS serialization library. but if you need it, here is the link to it

        database.lua: https://pastebin.com/XFfaFjEA

----Door Control: All the doorcontrol scripts. Can be very low spec honestly, but at least one 3.5 tier ram is probably safe :) Requires a Modem, redstone tier 2 card, and internet card only the first time you run the pastebin command.

    All you have to do is run the command "pastebin run X8M664ew" and follow the prompts. For multidoor, you will have to use an analyzer to copy the ids of the magstrip readers and rolldoor/doorcontrol blocks, while you dont with the single door one. However, if you want to look at the code, here are the dropbox links. HOWEVER, the programs do require a library to work, which the autorun command does for you, so I recommend just doing the above command.

    Single Door: https://pastebin.com/QxnRYA3B

    Multi Door: https://pastebin.com/sHfsrt2M

----NOT NECESSARY FOR PROGRAM TO WORK: Diagnostic tablet: a special program that works with the new admin card to get info about a door and it's settings and if it works. It is best used with a tablet that has a tier 3 gpu, a wireless modem, and an internet card. When the admin card is scanned, it sends all the info of the computer to the tablet. It's most noteable use is with the multidoor computer, as it tells you if that magnetic card reader is connected to a door, what the key of the door is (if you want to edit door settings after first set up) and more.

    Diagnostic tablet: https://pastebin.com/jv3Uhnme

Thats it :) Please don't hesitate to ask any questions and report any bugs! Once again, thank you to @Dustpuppy for the base security program I built off of! You can check it out here:

Update to program: The cards now rely on a uuid to link the cards. Before it used the name. The issue with using the name is if you change it, the card becomes unusable. The uuid is uneditable, but you can reset the uuid by pressing the reset uuid button. This will give it a new one, rendering previous cards unusable. Also changed how it saves the users, which means that all user lists WILL have to be reset unfortunately :( This updated Every single program, so you will have to 1. pastebin get 0DC4wQVU on the server. 2. on a random seperate computer, run component.modem.broadcast(199,"updatedoors") (I think it works). and 3. do pastebin get YQEWNpg for openos database, or just update the mineos program. Edit: THE PROGRAM FOR MULTIDOORCONTROLLER IS TOO BIG TO SEND TO THE MULTIDOOR COMPUTERS! You have to update them manually (unless you up the packet size in config for modem)



Edited by cadergator10
Update for diagnostics
Link to post
Share on other sites
23 hours ago, BrisingrAerowing said:

The OpenOS and MineOS Database links have identical content. I think you uploaded the MineOS one for both.

Fixed the OpenOS database! Not sure if it will work first time however, as I lost some of the newer code for it. I think it works now tho


Link to post
Share on other sites

Loading these files in VS Code shows a large number of syntax errors. I'm using the Lua Language server from sumneko. Some of these errors can be ignored (e.g. os.sleep isn't in base Lua), but a few break the code (e.g. line 129 of the multi door controller is missing quotes around the second io.open parameter).

Link to post
Share on other sites
On 9/5/2021 at 5:49 PM, BrisingrAerowing said:

Loading these files in VS Code shows a large number of syntax errors. I'm using the Lua Language server from sumneko. Some of these errors can be ignored (e.g. os.sleep isn't in base Lua), but a few break the code (e.g. line 129 of the multi door controller is missing quotes around the second io.open parameter).

The code uses the Open Computers serialization library. I'm not sure if there is a regular lua serialization library or not, but the code works in the game, so I'm not quite sure.

Link to post
Share on other sites
5 hours ago, BrisingrAerowing said:

I'm not talking about that. You have io.open with the second parameter not being in quotes, which breaks things as Lua thinks you're passing a variable.

local fill = io.open("doorSettings.txt", r)

The r needs quotes. Both door controller scripts have this issue.

Ah I see. Thank you for that! I wonder why it never errored

Link to post
Share on other sites

I updated the server to use a new system for saving the files, and a new way of checking the user! Before, it used the name. The problem with that is that if you change the name, you cant use the card anymore. Now, the card uses a UUID! It doesn't change unless you reset the uuid, which will give it a new uuid, rendering the old card useless. Way better over all. Also made it so if a user has the staff pass, it will let them in through ANY door. Also adding images rn

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.