TGC Codebase Backup



Password Computer Lock by Madkiller Max

28th May 2009 11:07
Summary

This is a program that you could use for a computer lock at startup!



Description

This is a program that you could use for a computer lock at startup!



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    REMSTART
property of www.thegameruler.us and the creator Madkiller Max
can always find me on steam as [MK] Madkiller Max (GOOGLE ME)
if you would like to use this code please say something that makes me connected to this part of the program
REMEND

part of the program
disable escapekey
disable systemkeys
set dir "C:"

`put forward lash after C: and Creation
make directory "C:/Madkiller Max Creation"
make directory "C:/Madkiller Max Creation/Password Computer Lock"
make directory "C:/Madkiller Max Creation/Password Computer Lock/Accounts"
make directory "C:/Madkiller Max Creation/Password Computer Lock/Admin"
set dir "C:/Madkiller Max Creation/Password Computer Lock/Accounts"

`start menu
startmenu:
disable systemkeys

set dir "C:/Madkiller Max Creation/Password Computer Lock/Accounts"

disable escapekey
cls
prettybackdropmenu()
wait 500
text 160,200, "1) Log In"
text 160,215, "2) Make an Account"
text 160,230, "3) Delete old Account"
text 160,245, "4) Administrator Account Startmenu"
repeat
until inkey$() = "1" or inkey$() = "2" or inkey$() = "3" or inkey$() = "4" or inkey$() = "5"
if inkey$() = "1" then goto login
if inkey$() = "2" then goto register
if inkey$() = "3" then goto Delete
if inkey$() = "4" then goto aas


delete:
disable systemkeys
disable escapekey
cls rgb (0,0,0)
prettybackdrop()
set cursor 200,200
input "Please type in a username to delete: ", userdelete$
set cursor 200,215
input "Please type in a password to delete: ", passworddelete$
set cursor 200,230
print "Are you sure you want to delete? Y/N:"
repeat
until inkey$() = "y" or inkey$() = "n"
if inkey$() = "y" then goto deletefile
if inkey$() = "n" then goto startmenu
cls rgb (0,0,0)


Deletefile:
disable systemkeys
disable escapekey
if file exist (userdelete$ + " " + passworddelete$ + ".txt")
   delete file userdelete$ + " " + passworddelete$ + ".txt"
   goto startmenu
else
   cls rgb (0,0,0)
   prettybackdrop()
   set cursor 160,200
   PRINT "USER FILE DOSE NOT EXIST GOING TO START!"
   wait 2000
   goto startmenu
endif


`if they decide to make an account ask for details
register:
disable systemkeys
disable escapekey
cls rgb (0,0,0)
prettybackdroplogin()
set cursor 200,200
input "Please type in a username: ", username$
set cursor 200,215
input "Please type in a password: ", password$
set cursor 200,230

if username$ = "" or password$ = "" or username$ = " " or password$ = " "
   cls rgb (0,0,0)
   prettybackdrop()
   set cursor 160,200
   PRINT "USER FILE REQUIRES USERNAME AND PASSWORD!"
   wait 2000
   goto startmenu
else
   prettybackdroplogin()
   print "Are you sure? Y/N:"
   repeat
   until inkey$() = "y" or inkey$() = "n"
   if inkey$() = "y" then goto newmember
   if inkey$() = "n" then goto startmenu
endif


`create files of those details
newmember:
disable systemkeys
disable escapekey

open to write 1, Username$ + " " + Password$ + ".txt"

cls
prettybackdrop()

text 200,200, "Registration successful!"
text 200,215, "GOING TO START MENU."
wait 2000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS.."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS..."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS.."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS..."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS.."
wait 1000
cls
prettybackdrop()
text 200,200, "TELLING ADMINS..."
wait 1000
cls
prettybackdrop()
text 200,200, "DONE TELLING ADMINS."
wait 1000
goto startmenu


aas:
disable systemkeys

`put forward lash after C: and Creation plus Door Lock
set dir "C:/Madkiller Max Creation/Password Computer Lock/Admin"
disable escapekey
cls rgb (0,0,0)
prettybackdropaaslogin()
set cursor 150,200
input "Please type in your username: ", adminlogin1$
set cursor 150,215
input "Please type in your password: ", adminlogin2$
if file exist (adminlogin1$ + " " + adminlogin2$ + ".txt")
   goto loadingad
else
   cls rgb (0,0,0)
   prettybackdrop()
   set cursor 160,200
   PRINT "USER FILE DOSE NOT EXIST GOING TO START!"
   wait 2000
   goto startmenu
endif


login:
disable systemkeys
disable escapekey
cls rgb (0,0,0)
prettybackdrop()
set cursor 150,200
input "Please type in your username: ", login1$
set cursor 150,215
input "Please type in your password: ", login2$

if login1$ = "" or login2$ = ""
   cls rgb (0,0,0)
   prettybackdrop()
   set cursor 160,200
   PRINT "USER FILE REQUIRES USERNAME AND PASSWORD!"
   wait 2000
   goto startmenu
else
   if file exist (login1$ + " " + login2$ + ".txt")
      goto loadingreg
   else
      ` backway into the admin menu!
      if login1$ = "1n" and login2$ = "1o" then goto loadingad
      ` backway finished
      cls rgb (0,0,0)
      prettybackdrop()
      set cursor 160,200
      PRINT "USER FILE DOSE NOT EXIST GOING TO START!"
      wait 2000
      goto startmenu
   endif
endif


loginsuccessful:
disable systemkeys
disable escapekey
cls rgb (100,150,200)
text 230,230, "Successful login!"
goto startmenu


loginadminsuccessful:
set dir "C:/Madkiller Max Creation/Password Computer Lock/Accounts"
disable systemkeys
disable escapekey
cls
prettybackdropadminmenu()
text 160,170, "1) Start"
text 160,185, "2) Restart Program"
text 160,200, "3) Make a Regular Account"
text 160,215, "4) Make an Admin Account"
text 160,230, "5) Delete old Account"
text 160,245, "6) Make a Regualar User Admin"
text 160,260, "7) Other Programs by Madkiller Max"
repeat
until inkey$() = "1" or inkey$() = "2" or inkey$() = "3" or inkey$() = "4" or inkey$() = "5" or inkey$() = "6" or inkey$() = "7" or inkey$() = "8"
if inkey$() = "1" then goto startmenu
if inkey$() = "2" then goto restart
if inkey$() = "3" then goto registerreg
if inkey$() = "4" then goto registeradmin
if inkey$() = "5" then goto delete
if inkey$() = "6" then goto regtoad
if inkey$() = "7" then goto otherpro


registeradmin:
disable systemkeys
disable escapekey
cls rgb (0,0,0)
prettybackdrop()
set cursor 200,200
input "Please type in a username: ", usernameadmin$
set cursor 200,215
input "Please type in a password: ", passwordadmin$
set cursor 200,230

if usernameadmin$ = "" or passwordadmin$ = "" or usernameadmin$ = " " or passwordadmin$ = " "
   cls rgb (0,0,0)
   prettybackdrop()
   set cursor 160,200
   PRINT "USER FILE REQUIRES USERNAME AND PASSWORD!"
   wait 2000
   goto startmenu
else
   prettybackdrop()
   print "Are you sure? Y/N:"
   repeat
   until inkey$() = "y" or inkey$() = "n"
   if inkey$() = "y" then goto newmemberadmin
   if inkey$() = "n" then goto loginadminsuccessful
endif


`create files of those details
newmemberadmin:
disable systemkeys
disable escapekey
open to write 1, Usernameadmin$ + " " + Passwordadmin$ + ".txt"

cls
prettybackdrop()
text 200,200, "Registration successful!"
text 200,215, "Please restart program for this to take effect"
wait 2000
goto loginadminsuccessful


regtoad:
set dir putfile$ + "/Madkiller Max Creation/Password Computer Lock/Accounts"
disable systemkeys
disable escapekey
cls rgb (0,0,0)
prettybackdrop()
set cursor 200,200
input "Please type in a username: ", usernameadmin$
set cursor 200,215
input "Please type in a password: ", passwordadmin$
set cursor 200,230
disable systemkeys
disable escapekey
set dir "C:/Madkiller Max Creation/Password Computer Lock/Accounts"
if file exist (usernameadmin$ + " " + passwordadmin$ + ".txt")
   move file usernameadmin$ + " " + passwordadmin$ + ".txt", "C:/Madkiller Max Creation/Password Computer Lock/Admin" + usernameadmin$ + " " + passwordadmin$ + ".txt"
   delete file "C:/Madkiller Max Creation/Password Computer Lock/Accounts" + usernameadmin$ + " " + passwordadmin$ + ".txt"
else
   cls rgb (0,0,0)
   prettybackdrop()
   set cursor 160,200
   PRINT "USER FILE DOSE NOT EXIST GOING TO START!"
   wait 2000
   goto loginadminsuccessful
endif


`create files of those details
newmemberadmin:
set dir "C:/Madkiller Max Creation/Password Computer Lock/Admin"
disable systemkeys
disable escapekey
open to write 1, Usernameadmin$ + " " + Passwordadmin$ + ".txt"

cls rgb (100,90,110)
prettybackdrop()
text 200,200, "Registration successful!"
text 200,215, "Please restart program for this to take effect"
wait 2000
goto loginadminsuccessful


`if they decide to make an account ask for details
registerreg:
disable systemkeys
disable escapekey
cls rgb (0,0,0)
prettybackdrop()
set cursor 200,200
input "Please type in a username: ", username$
set cursor 200,215
input "Please type in a password: ", password$
set cursor 200,230

if username$ = "" or password$ = "" or username$ = " " or password$ = " "
   cls rgb (0,0,0)
   prettybackdrop()
   set cursor 160,200
   PRINT "USER FILE REQUIRES USERNAME AND PASSWORD!"
   wait 2000
   goto startmenu
else
   prettybackdrop()
   print "Are you sure? Y/N:"
   repeat
   until inkey$() = "y" or inkey$() = "n"
   if inkey$() = "y" then goto newmemberreg
   if inkey$() = "n" then goto loginadminsuccessful
endif


`create files of those details
newmemberreg:
disable systemkeys
disable escapekey

open to write 1, Username$ + " " + Password$ + ".txt"

cls
prettybackdrop()

text 200,200, "Registration successful!"
text 200,215, "GOING TO START MENU."
wait 2000
goto loginadminsuccessful


restart:
disable systemkeys
disable escapekey
goto proend


otherpro:
prettybackdrop()
text 160,200,"Ending program"
wait 1000
cls
prettybackdrop()
text 160,200,"Ending."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending.."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending..."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending.."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending..."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending.."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending..."
wait 1000
prettybackdrop()
rem get website
myweb$ = "http://omegabasic.thegamecreators.com/?m=codebase_list&c=&l=&p=&a=3734741ba71e2e1893b8f37bcc0d35d8"
rem Launch website
execute file myweb$,"",""
end


loadingreg:
disable escapekey
disable systemkeys
prettybackdrop()
text 200,200, "LOADING."
wait 1000
prettybackdrop()
text 200,200, "LOADING.."
wait 1000
prettybackdrop()
text 200,200, "LOADING..."
wait 1000
prettybackdrop()
text 200,200, "LOADING."
wait 1000
prettybackdrop()
text 200,200, "LOADING.."
wait 1000
prettybackdrop()
text 200,200, "LOADING..."
wait 1000
prettybackdrop()
text 200,200, "LOADING."
wait 1000
prettybackdrop()
text 200,200, "LOADING.."
wait 1000
prettybackdrop()
text 200,200, "LOADING..."
wait 1000
prettybackdrop()
goto loginsuccessful


loadingad:
disable escapekey
disable systemkeys
prettybackdrop()
text 200,200, "LOADING."
wait 1000
prettybackdrop()
text 200,200, "LOADING.."
wait 1000
prettybackdrop()
text 200,200, "LOADING..."
wait 1000
prettybackdrop()
text 200,200, "LOADING."
wait 1000
prettybackdrop()
text 200,200, "LOADING.."
wait 1000
prettybackdrop()
text 200,200, "LOADING..."
wait 1000
prettybackdrop()
text 200,200, "LOADING."
wait 1000
prettybackdrop()
text 200,200, "LOADING.."
wait 1000
prettybackdrop()
text 200,200, "LOADING..."
wait 1000
prettybackdrop()
goto loginadminsuccessful


proend:
prettybackdrop()
text 160,200,"Ending program"
wait 1000
cls
prettybackdrop()
text 160,200,"Ending."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending.."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending..."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending.."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending..."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending.."
wait 1000
cls
prettybackdrop()
text 160,200,"Ending..."
wait 1000
end


function prettybackdropmenu
 box 0,0,640,480,rgb(0,128,128),rgb(128,0,0),rgb(128,0,128),rgb(128,128,0)
 Text 200,0,"Madkiller Max Creation"
 Text 200,15,"Main Menu"
endfunction

function prettybackdrop
 box 0,0,640,480,rgb(0,128,128),rgb(128,0,0),rgb(128,0,128),rgb(128,128,0)
 Text 200,0,"Madkiller Max Creation"
endfunction

function prettybackdropadminmenu
 box 0,0,640,480,rgb(0,128,128),rgb(128,0,0),rgb(128,0,128),rgb(128,128,0)
 Text 200,0,"Madkiller Max Creation"
 Text 200,15,"Admin Main Menu"
endfunction

function prettybackdroplogin
 box 0,0,640,480,rgb(0,128,128),rgb(128,0,0),rgb(128,0,128),rgb(128,128,0)
 Text 200,0,"Madkiller Max Creation"
 Text 200,15,"Login"
endfunction

function prettybackdropaaslogin
 box 0,0,640,480,rgb(0,128,128),rgb(128,0,0),rgb(128,0,128),rgb(128,128,0)
 Text 200,0,"Madkiller Max Creation"
 Text 200,15,"AAS Login"
endfunction