Recommend to have a basic understanding of Lua before using this and be aware this is not very secure and can be bypassed very easily.
Script:
key = "Secret"function getKey()rconsoleprint("Enter key: ")local key = rconsoleinput()return keyendfunction checkKey(enteredKey)local correctKey = keyif enteredKey == correctKey thenreturn trueelsereturn falseendendwhile true dolocal key = getKey()if checkKey(key) thenrconsoleprint("Correct key!\n")breakelserconsoleprint("Incorrect key, please try again.\n")endend
Post a Comment (0)