Advertisement
Vaeb

Encrypter

Aug 17th, 2015
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. --KeyWord must only contain letters and/or numbers!
  2. --Run in studio
  3.  
  4. local KeyWord = "dog"
  5. local KeyNums = {}
  6. local NewSource = ""
  7. local Valid = {"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", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}
  8.  
  9. local Source = [===========================[
  10. print("Hello world!")
  11. ]===========================]
  12.  
  13. KeyWord = KeyWord:lower()
  14.  
  15. for i = 1, #KeyWord do
  16.     KeyNums[#KeyNums+1] = string.byte(KeyWord:sub(i, i))
  17. end
  18.  
  19. print("Encrypting")
  20.  
  21. local WaitNum = 0
  22. for i = 1, #Source do
  23.     local Byte = string.byte(Source:sub(i, i))
  24.     local MiniByte = Byte/#KeyNums
  25.     for i = 1, #KeyNums do
  26.         NewSource = NewSource .. (MiniByte*KeyNums[i]) .. ":"
  27.     end
  28.     WaitNum = WaitNum + 1
  29.     if WaitNum % 5000 == 0 then
  30.         wait((WaitNum/10000)*1.5)
  31.         print(WaitNum, #Source)
  32.     end
  33. end
  34. NewSource = NewSource:sub(1, #NewSource-1)
  35.  
  36. print("------DONE------")
  37.  
  38. print(NewSource)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement