Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

[ADMIN COMMAND] How to create?

Asked by 7 years ago

Question 1: If I want the script of the "message hello world" script to recognize the function * message *

Question 2: If for example I would like that when the player writes "message hello world" the word message is deleted in the print?

script.Parent = game.ServerScriptService

local Authorization = {"NiniBlackJackQc","DAHUI84","Player1"}

function isAuthorized(player)
    if player.UserId == game.CreatorId then
        return true
    end
    for _, name in pairs(Authorization) do
        if name == player.Name then
            return true
        end
    end
end

game.Players.ChildAdded:connect(function(player)
    player.Chatted:connect(function(chat)
        if isAuthorized(player) then
            if string.lower(chat) == "admin" then
                print(player.Name.." is a ( owner ) - ( admin ) !")
            end
        end
    end)
end)
0
What does not work with the script? What are the errors? TheLuckyZ 24 — 7y
0
There's a wiki document on this; also, Scripting Helpers is not a request site: we help you w/ your scripts' (problems), not make them for you. (This comment is based around what you've said in your texts) http://wiki.roblox.com/index.php?title=Chat_commands TheeDeathCaster 2368 — 7y

Answer this question