Advertisement
NiceBBMBThai

RConsole Key System

Mar 5th, 2023
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. --[[
  2. Tested On Synapse X
  3. ]]--
  4.  
  5.  
  6. key = "Key" -- Put Key Here.
  7.  
  8. function getKey() -- Don't Touch If You Don't Know What Are You Doing.
  9. rconsoleprint("Enter key: ")
  10. local key = rconsoleinput()
  11. return key
  12. end
  13.  
  14. function checkKey(enteredKey) -- Don't Touch If You Don't Know What Are You Doing.
  15. local correctKey = key
  16. if enteredKey == correctKey then
  17. return true
  18. else
  19. return false
  20. end
  21. end
  22.  
  23. while true do
  24. local key = getKey()
  25. if checkKey(key) then
  26. rconsoleprint("Correct key!\n")
  27. -- Put Here Script
  28. break
  29. else
  30. rconsoleprint("Incorrect key, please try again.\n")
  31. end
  32. end
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement