xXm0dzXx

Untitled

Sep 22nd, 2012
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. local id=1
  2. 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','_'}
  3. function cyclechar(current)
  4. local tChars={}
  5. for i=1,#current do
  6. tChars[#tChars+1]=string.sub(current,i,i)
  7. end
  8. --for k,v in pairs(tChars) do print(v) end
  9. local at=#tChars+1
  10. local returned=nil
  11. local looping=1
  12. while looping==1 do
  13. at=at-1
  14. if at==0 then
  15. returned='a'
  16. break
  17. end
  18. for k,v in pairs(chars) do
  19. if tChars[at]==v and k~=#chars then
  20. tChars[at]=chars[k+1]
  21. looping=0
  22. break
  23. elseif tChars[at]==v and k==#chars then
  24. tChars[at]=chars[1]
  25. end
  26. end
  27. end
  28. local returned=returned or ''
  29. for k,v in pairs(tChars) do
  30. returned=returned..v
  31. end
  32. return returned
  33. end
  34.  
  35. --aaaaaa
  36. file1 = fs.open("words.txt","w")
  37. keycode = read()
  38. while true do
  39. fileneww = [[
  40. while true do
  41. keycode=cyclechar(keycode)
  42. file1.write(keycode.. "\n")
  43. end
  44. ]]
  45. fs.delete("runforce")
  46. file = fs.open("runforce", "w")
  47. file.write(fileneww)
  48. file.close()
  49. shell.run("runforce")
  50. sleep(1)
  51. print(keycode)
  52. end
Advertisement
Add Comment
Please, Sign In to add comment