Hello Developers!
Warning
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:
https://www.roblox.com/library/9050536657/DanAI-2-ChatBot
This is not the best, and this is just for fun!
Hope this helps someone, have a good day