Scripters, tell me if this is possible

Hey there, so I was wondering if in roblox studio using lua you can make a script that detects whenever a player uses the chat system to say anything, a variable I create goes up for each message they send. Just like MEE6 levels on discord. All I need to know is if this is plausible and can be done easily.

Thank you!

It is certainly possible. A good example as things like HD Admin whereby the code checks for user input to initiate commands.

However, you might have to fork the Chat codebase to achieve this or somehow intercept the chat entries via the client. I will leave it to others to explain exactly how.

1 Like

Thanks, I was just wondering if i press “/” to type and say, “whats up?” A variable would go up like 10 xp for saying that message.

Actually, there’s an event for that:

Player.Chatted:Connect(function(Message)

end)

Basically Player would be the LocalPlayer and Message would be the message sent by the player.

You can use HTTP Service and webhooks if you want to connect it to discord.

2 Likes

So basically I use that function and I add to it a variable or whatever I want to increase, it coukd be anything.

But what do people generally use that command for?

They generally use it for when the player chats, and maybe admin commands.

1 Like

But for sure it could be used for an in game leveling system?

Yes, with coding, you can technically do anything!

1 Like