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

How binding tools to admin commands ?

Asked by 9 years ago

How binding tools and to admin commands ? For example: ":give me fruit" then Tool "fruit" will be in my Backpacke.

1 answer

Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
9 years ago

We can not make the script for you, however the script will use a combination of the Chatted Event, and String Manipulation.

Here's a sample code:

game.Players.PlayerAdded:connect(function(plr) --Player joined the game, now the function will handle what you want to do with the player.
    plr.Chatted:connect(function(chat) --Player said something the function will handle what to do with that too.
        if chat:sub(1,6) == ":give " then --Did the player say :give something?
            --Finish code
        end
    end)
end)
Ad

Answer this question