4 added 1233 characters in body
source | link

CJam, 65 52 49 bytes

l{_{_",.?!"#:IW>)mr{SI'M'm?3mr)*"'kay"3$}&}%__s=%_@=}g

Try it online in the CJam interpreterCJam interpreter.

How it works

l            e# Read a line from STDIN.
{            e# Do:
  _          e#   Duplicate the line.
  {          e#   For each of its characters:
    _",.?!"# e#     Find its index in that string.
    :IW>     e#     Save the index in I and check if it's greater than -1.
    )        e#     Add 1 to the resulting Boolean.
     mr      e#     Pseudo-randomly select a non-negative integer below that sum.
             e#     If I == -1 the result will always be 0.
    {        e#     If the result is 1:
      S      e#       Push a space.
      I'M'm? e#       Select 'm' if I == 0 (comma) and 'M' otherwise.
      3mr)   e#       Pseudo-randomly select an integer in [1 2 3].
      *      e#       Repeat the M that many times.
      "'kay" e#       Push that string. MMM'kay.
      3$     e#       Copy the proper punctuation.
    }&       e#
  }%         e#
  _          e#   Copy the resulting array.
  @=         e#   Compare it to the copy from the beginning.
}g           e# Repeat the loop while the arrays are equal.
             e# This makes sure that there's at least one m'kay. M'kay.

CJam, 65 52 49 bytes

l{{_",.?!"#:IW>)mr{SI'M'm?3mr)*"'kay"3$}&}%__s=}g

Try it online in the CJam interpreter.

CJam, 65 52 49 bytes

l{_{_",.?!"#:IW>)mr{SI'M'm?3mr)*"'kay"3$}&}%_@=}g

Try it online in the CJam interpreter.

How it works

l            e# Read a line from STDIN.
{            e# Do:
  _          e#   Duplicate the line.
  {          e#   For each of its characters:
    _",.?!"# e#     Find its index in that string.
    :IW>     e#     Save the index in I and check if it's greater than -1.
    )        e#     Add 1 to the resulting Boolean.
     mr      e#     Pseudo-randomly select a non-negative integer below that sum.
             e#     If I == -1 the result will always be 0.
    {        e#     If the result is 1:
      S      e#       Push a space.
      I'M'm? e#       Select 'm' if I == 0 (comma) and 'M' otherwise.
      3mr)   e#       Pseudo-randomly select an integer in [1 2 3].
      *      e#       Repeat the M that many times.
      "'kay" e#       Push that string. MMM'kay.
      3$     e#       Copy the proper punctuation.
    }&       e#
  }%         e#
  _          e#   Copy the resulting array.
  @=         e#   Compare it to the copy from the beginning.
}g           e# Repeat the loop while the arrays are equal.
             e# This makes sure that there's at least one m'kay. M'kay.
3 added 6 characters in body
source | link

CJam, 65 5252 49 bytes

l{{_",.?!"#:IIW>)2mr*mr{S3mrSI'M'm?3mr)'MI!32*|*"'kay"3$*"'kay"3$}&}%_Sa&!%__s=}g

Try it online in the CJam interpreterCJam interpreter.

CJam, 65 52 bytes

l{{_",.?!"#:I)2mr*{S3mr)'MI!32*|*"'kay"3$}&}%_Sa&!}g

Try it online in the CJam interpreter.

CJam, 65 52 49 bytes

l{{_",.?!"#:IW>)mr{SI'M'm?3mr)*"'kay"3$}&}%__s=}g

Try it online in the CJam interpreter.

2 deleted 36 characters in body
source | link

CJam, 6565 52 bytes

l{{_",.?!"#:I)2mr*{4,0+0+mR'MIS3mr)'MI!32*|*" 


'kay"4/1$*2$+e&32*|*"'kay"3$}&}%s_N&%_Sa&!}gN-g

First attempt.Try it online in the Try it online.CJam interpreter.

CJam, 65 bytes

l{{_",.?!"#:I){4,0+0+mR'MI!32*|*" 


'kay"4/1$*2$+e&}&}%s_N&!}gN-

First attempt. Try it online.

CJam, 65 52 bytes

l{{_",.?!"#:I)2mr*{S3mr)'MI!32*|*"'kay"3$}&}%_Sa&!}g

Try it online in the CJam interpreter.

1
source | link