lolzc4

CommandRunner

Dec 29th, 2021 (edited)
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. game.Players.LocalPlayer.Chatted:Connect(function(msg, player)
  2.     local msg = string.lower(msg)
  3.     local splitted = msg:split(" ")
  4.     local slashCmd = splitted[1]
  5.     local cmd = slashCmd:split(prefix)
  6.     local name = cmd[2]
  7.     if cmds[name] then
  8.         local args = {}
  9.         for i = 2, #splitted, 1 do
  10.             table.insert(args, splitted[i])
  11.         end
  12.         cmds[name](player, args)
  13.     end
  14. end)
  15.  
Add Comment
Please, Sign In to add comment