Help with command script for textbox instead of chat

I am trying to make something like this but for a textbox frame instead of the chat:

	local loweredString = string.lower(msg)
	local args = string.split(loweredString," ")
	if args[1] == prefix.."walkspeed" then
		if args[2] then
			local volume = args[2]

I currently have this, but I do not know how I could add args detection:

	if enterPressed then
		if commandbox.Text == 'walkspeed' then

Can someone help me solve this?

It’s exactly the same, but use commandbox.Text instead of msg.