Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Program Selector 2.0 by xiTe
- cls
- set tries=3
- :usercheck
- if exist username.txt (
- goto passcheck
- ) else (
- goto userinput
- )
- :passcheck
- if exist password.txt (
- goto login
- ) else (
- goto passwinput
- )
- :userinput
- set setusername=
- set /P setusername=Choose username: %=%
- echo Your username is: %setusername%
- pause
- echo %setusername% >>username.txt
- cls
- :passwinput
- set setpassword=
- set /P setpassword=Choose password: %=%
- echo Your password is: %setpassword%
- pause
- echo %setpassword% >>password.txt
- cls
- :login
- :tries
- set /a tries=%tries% -1
- if %tries%==0 (
- goto exit
- )
- :username
- color 0f
- set /p user=Enter Username:
- if %user% == %setusername% (goto password) else (goto denied)
- cls
- :password
- cls
- set /p passw=Enter Password:
- if %passw% == %setpassword% (goto granted) else (goto denied)
- cls
- :denied
- cls
- color 0c
- echo Access Denied
- echo You have %tries% attempts left.
- pause
- cls
- goto tries
- :granted
- cls
- color 0a
- echo Access Granted
- pause
- cls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement