Making a UI visible by saying a word in chat

Hello everyone! I was making an admin panel and was wondering how do I make a UI visible by saying a code or a password? (Of course, I added so only certain people can say the command so people cant hack in the admin panel) But I can’t seem to find any tutorials on this! Also what I mean by password is you type a code in chat like: “/e AdminPanel”, or something else. Please help if you know. Thanks.

3 Likes

Anything on the client can be accessed and, you shouldn’t be asking for free code, but here is the “template” for what you’re looking for:

local plr = game.Players.LocalPlayer

plr.Chatted:Connect(function(msg)
    if msg = "!AdminPanel" then
        Gui.Visible = true-- ScreenGui.Enabled = true
    end
end)
5 Likes

Thank you so much I was looking for this! (Sorry for asking for free code.)

1 Like

Hello, you can use Chatted() to fire an event when player chats.
Let’s say the password for UI is "edvin712".

local passWord = "edvin712" -- Set password
local LocalPlayer = game:GetService("Players").LocalPlayer
local WhiteList = {"edvin712"}  -- Only whitelisted player can use the command.

LocalPlayer.Chatted:Connect(function(msg, player)
   if not table.find(WhiteList, LocalPlayer.Name) then return end
   if msg == passWord then
      yourScreenGui.Enabled = true -- yourScreenGui will be your admin panel UI
   end
end)
2 Likes

You can also make it case sensitive, by using msg:lower()

2 Likes