--note this specific event has 2 parametersfunctionyourFunctionName(user,string_message) log(user.displayName ..' has said ' .. string_message);endreturnfunction()--attaches the event to yourFunctionName() addEvent('chatMessage', 'yourFunctionName'); wait(3);--unsubscribe your function from receiving events removeEvent('chatMessage'); --make sure this script is kept alive so the event can be processed! keepAlive();end