Chat Bot Module

Hello Developers!


This is not a AI, this give you a random response based on the thing you said.

I have many games that have cool stuff in it, but no one players the game. So this is first of many posts that will be open sourcing some of the stuff inside of my games.

This script is from my game DanAI 2.

How is how you use it:

-- How to use:
local ChatBox = require(game.ServerScriptService.DanAI2Brain) --Or where ever your module script is
-- To call it, use the function GetAnswer:
local Output = ChatBox.GetAnswer('How are you today?') -- you can put any text there, some strings will not work
-- the Output return the folowing:
-- Output[1] -- If it worked or not (true or false)
-- Output[2] -- The answer, if it did work (string)
-- Output[3] -- Code, this tell you what it went through to get that answer (look at the script, it will make more sense)
-- Here is a test:
print('Did it work: '..tostring(Output[1])..'\nOutput: '..tostring(Output[2]..'\nCode: '..tostring(Output[3])))

You can find the Module here:

This is not the best, and this is just for fun! :slight_smile:

Hope this helps someone, have a good day :slight_smile:


After reviewing the module, Iā€™d rather call it rather weak due to the poor variety it serves. For the true AI experience, you ought to have used the GPT-3 OpenAI API to generate AI answers for practically everything (OpenAI API)

1 Like

2 things:



GPT-3 does not work in luau.

1 Like

you can fetch requests from a GDU server

1 Like

I will have to look into this then, thank you for posting.

1 Like

Yeah just look at the api the person gave you above

1 Like

@commitblue and @Kostiskat, GPT-3 will not work! You have to have a api key, so this will not work.