custom command roblox
function onChatted(msg, speaker)
local source = string.lower(speaker.Name)
msg = string.lower(msg)
local args = {}
for word in msg:gmatch("%S+") do table.insert(args, word) end
local command = args[1]
table.remove(args, 1)
-- Commands
if command == "/sit" then speaker.Character.Humanoid.Sit = true end
end
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg) onChatted(msg, player) end)
end)