Advertisement
4zx16

Chat Command

Nov 5th, 2021 (edited)
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || CHAT COMMAND
  3. ]]
  4. local Command = {} -- Your Commands Go here
  5.  
  6. game.Players.PlayerAdded:Connect(function(player)
  7.     player.Chatted:Connect(function(msg)
  8.  
  9.         for i, ChatCommand in pairs(Command) do
  10.             if msg:sub(1, ChatCommand:len()):lower() == ChatCommand:lower() then
  11.                 print(player.Name.. " chatted ".. msg)
  12.             else
  13.                 print("idk")
  14.             end
  15.         end
  16.     end)
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement