Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p=peripheral.wrap("back")
- function fileToTable(file)
- if fs.exists(file)~=true then
- print("file"..file.." not found")
- return(false)
- end
- fp=fs.open(file,"r")
- line={}
- i=1
- line[i]=fp.readLine()
- if line[i]==nil then return(false) end
- while line[i]~=nil do
- i=i+1
- line[i]=fp.readLine()
- end
- return(line)
- end
- while true do
- user, player = os.pullEvent("player")
- print(player)
- user=fileToTable("users")
- i=1
- while user[i]~=nil do
- if player==user[i] then
- rs.setOutput("right",true)
- sleep(5)
- rs.setOutput("right",false)
- sleep(0.2)
- end
- i=i+1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement