I am making a admin script and I want it so were if you chat it see you used : and it knows that the rest might be the command, so the command can be searched through a list of function and if its a function then it could do something like
runfunction(Variable)
if variable == "whatver" then elseif variable3 == "whatevr2" then elseif variable4 == "whtevr2" then end
You'll need to use string.sub(), of a function of the string manipulation functions. You can find it here : http://wiki.roblox.com/index.php?title=Global_namespace/String_manipulation
game.Players.ChildAdded:Connect(function(player) player.Chatted:Connect(function(msg) if msg:sub(1,1) == ':' then runfunction(msg:sub(2)) end end) end)