I am looking to see if there is a way that will detect if a player says something like ":Kill others" and it would detect that person has said ":" before everything else. I know you can detect words, but i don't know if you can just detect a single part of the word.
This is not a request site, but since your request is easy I will assist you.
game:GetService("Players").PlayerAdded:connect(function(s) --You need to connect to the player, so the player's name is 's'. s.Chatted:connect(function(m) --Whenever 's' says something, then the function executes. if m:sub(1,1) == ":" then --If he says : before anything then the next few lines will run. --What do you want to do to the speaker 's'? end end) end)
Erm..
game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(msg) if msg:sub(1,12) == ":Kill others" then for i,v in pairs(game.Players:GetPlayers()) do if v.Name ~= p.Name then repeat wait() until v.Character v.Character:BreakJoints() end end end end end)
Try it. It has no admin, you'll have to implement it yourself, but if someone types in ':Kill others', it would 'kill' other players, besides them.