Advertisement
WaffleJohns

Tekkit Light Cypher Password

Jan 19th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. --This password will be "cypherd" (Not really) so people dont just go "edit startup" and see it, the cypher is pretty weak but will discourage most people
  2. --Use https://pastebin.com/qa1HP7X2 to find the cyphers
  3.  
  4. local pullEvent = os.pullEvent --Lines 3,4, and 26 came from the computercraft WIKI
  5. os.pullEvent = os.pullEventRaw
  6.  
  7. local correct= false
  8. local attempts = 0
  9. local iPassword --Inputed password
  10. local cPassword --Output password
  11.  
  12. while correct == false do
  13. print("Password Required")
  14. iPassword = read()
  15. iPassword = string.byte(iPassword)
  16. iPassword = (iPassword*24^2/3+23%3)+(-iPassword*80%4) --This is the "hash"
  17. if iPassword == 15362 then --15362 is the encrypted version of "Password"
  18. correct = true
  19. term.clear() --Clear the screen and reset cursor
  20. term.setCursorPos(1,1)
  21. else
  22. attempts = attempts + 1
  23. term.clear() --Clear the screen and reset cursor
  24. term.setCursorPos(1,1)
  25. for i = 5*attempts,0,-1 do --Time increases with all failed attempts
  26. print("Password Incorrect ".. "Attempts: ".. attempts) --Incorrect password cooldown
  27. print(i)
  28. sleep(1)
  29. term.clear() --Clear the screen and reset cursor
  30. term.setCursorPos(1,1)
  31. end
  32.  
  33. end
  34. end
  35.  
  36. attempts = 0
  37. os.pullEvent = pullEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement