This tutorial will teach you how to setup a login system for your computer.

Start by editing the startup file, notice: When copying and pasting this code, it may copy some HTML with it resulting in Symbol errors. Clean out the HTML is that is the case.

-- Login System
-- Written by Brainless243
-- Posted to The Tekkit Wiki on 10/24/2012

-- Edited by Marumaru352

os.pullEvent = os.pullEventRaw -- Prevents CTRL+T shortcut

term.clear() -- Clears the screen
term.setCursorPos(1, 1) -- This places the print position to the top of screen

username = {"user1", "user2", "user3"}  -- Here you need to define all usernames available
password = {"pass1", "pass2", "pass3"}  -- Here you define what password each user has, remember to put user1's password in the first row and so on.

write("Username: ")
user = read()

write("Password: ")
pass = read('*') -- This prevents people from reading the password as you put it in

for i=1, #username do -- Starts a loop
 if user == username[i] and pass == password[i] then
   access = true

if access == true then
print("Logging in...")
print("Welcome "..user)
print("Incorrect username and password combination")

How to make a log-in screen for your computer in computercraft tekkit05:30

How to make a log-in screen for your computer in computercraft tekkit

Start a Discussion Discussions about Tutorial/Login System

  • code not working

    2 messages
    • wrote: It seems like you're using a version of ComputerCraft that is featured in Tekkit Class...
  • How do i register?

    2 messages
    • I've login with a new user but i can't because i didn't have any account yet
    • Do you have a minecraft account? If not, headover to to register!

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.