Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name="user"
- function Main()
- local pass = {'not','getting','mypass'}
- --backup, just incase. also for more complex code :/ oh well.
- pullBack = pullEvent
- osPullBack = os.pullEvent
- rawBack = os.pullEventRaw
- --disable events...
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- write("Enter Password: ")
- input=read("*")
- if input==pass[1] then
- print("WARNING: SIGNED IN AS GUEST. RESTRICTIONS ENABLED")
- user = 0 --note; user=0 is guest, user=1 is a friend, user=2 is me
- sleep(2)
- elseif input==pass[3] then
- print("NOTICE: SIGNED IN AS FRIEND. SOME RESTRICTIONS NOT REMOVED")
- user = 1
- sleep(2)
- elseif input==pass[2] then
- print("SIGNED IN AS LINK. RESTRICTIONS REMOVED")
- --enable events.
- pullEvent = pullBack
- osPullBack = os.pullEvent
- rawBack = os.pullEventRaw
- --complex stuffs. first ask generic what do you want with a 'help'
- user = 2
- sleep(2)
- else
- os.reboot()
- end
- Username(user,name)
- print("Welcome back "..name)
- write("What do you want to do? (help for list)")
- inputb=read()
- if inputb=="help" then
- print("internet (teir 1 required)")
- print("help (teir 0 required)")
- print("exit (reboots computer; teir 0 required)")
- print("Note: no caps in commands.")
- elseif inputb=="internet" then
- if user==1 or user>1 then
- Internet()
- else
- permerr()
- end
- end
- end
- function permerr()
- print("WARNING: INSUFFICIENT PERMMISIONS")
- end
- --[[
- function Internet()
- local CN="string"
- local name="string"
- local style="string"
- term.clear()
- term.setCursorPos(1,1)
- term.write("What kind of internet do you want (host/client)\n")
- term.setCursorPos(1,2)
- style=io.read()
- if style=="join" then
- term.write("What is the name of the chat? \n")
- term.setCursorPos(1,4)
- CN=io.read()
- term.write("What shall you be called? \n")
- term.setCursorPos(1,6)
- name=io.read()
- shell.run("chat join "..CN.." "..name)
- elseif style=="host" then
- term.write("What will be the name of the chat?\n")
- term.setCursorPos(1,4)
- CN=io.read()
- shell.run("chat host "..CN)
- end
- end
- --]]
- function Username(teir,res)
- if teir==0 then
- res="guest"
- elseif teir==1 then
- res="friend"
- elseif teir==2 then
- res="Link"
- else
- res="ERROR"
- end
- return(res)
- end
- Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement