Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local id=1
- chars={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','_'}
- function cyclechar(current)
- local tChars={}
- for i=1,#current do
- tChars[#tChars+1]=string.sub(current,i,i)
- end
- --for k,v in pairs(tChars) do print(v) end
- local at=#tChars+1
- local returned=nil
- local looping=1
- while looping==1 do
- at=at-1
- if at==0 then
- returned='a'
- break
- end
- for k,v in pairs(chars) do
- if tChars[at]==v and k~=#chars then
- tChars[at]=chars[k+1]
- looping=0
- break
- elseif tChars[at]==v and k==#chars then
- tChars[at]=chars[1]
- end
- end
- end
- local returned=returned or ''
- for k,v in pairs(tChars) do
- returned=returned..v
- end
- return returned
- end
- --aaaaaa
- file1 = fs.open("words.txt","w")
- keycode = read()
- while true do
- fileneww = [[
- while true do
- keycode=cyclechar(keycode)
- file1.write(keycode.. "\n")
- end
- ]]
- fs.delete("runforce")
- file = fs.open("runforce", "w")
- file.write(fileneww)
- file.close()
- shell.run("runforce")
- sleep(1)
- print(keycode)
- end
Advertisement
Add Comment
Please, Sign In to add comment