4zx16

Whitelist Key

Jul 18th, 2021 (edited)
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || WHITELIST KEY
  3. ]]
  4. local EnterButton = script.Parent
  5. local KeyCodeBox = script.Parent.Parent.Codebox
  6.  
  7. local AccessKey = "Enter Your Custom Key Here"
  8. local PlayerService = game.Players.LocalPlayer
  9.  
  10. EnterButton.MouseButton1Click:Connect(function()
  11.     if KeyCodeBox.Text ~= AccessKey then
  12.         -- This Happens If The Key Is Incorrect
  13.         PlayerService:Kick("Please enter the correct key.")
  14.  
  15.     elseif KeyCodeBox.Text == AccessKey then
  16.         -- This Happens If The Key Is Correct
  17.     end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment