Skip to content

Instantly share code, notes, and snippets.

@TheEpicFace007
Last active April 1, 2023 10:11
Show Gist options
  • Save TheEpicFace007/9f26fb2694d1f71398b783ded5ed8d79 to your computer and use it in GitHub Desktop.
Save TheEpicFace007/9f26fb2694d1f71398b783ded5ed8d79 to your computer and use it in GitHub Desktop.
Cleverbot for roblox exploit
-- https://chatengine.xyz/chat
local Players = game:GetService("Players")
local http_service = game:GetService("HttpService")
math.randomseed(tick())
local authorization_cookie = "b1060a52b07c933b192298aede18a4e079e2cb3be98c2bd6fcd30e77c4c80cb9822937927db1797ccc9fdc6804e85777"
if syn then
http_request = syn.request
end
function send_msg_ai(message)
local response = http_request({
Url = "https://chatengine.xyz/api/ask";
Method = "POST";
Headers =
{
["content-type"] = "application/json";
["Authorization"] = authorization_cookie
};
Body = http_service:JSONEncode({query = message})
})
return response
end
function chat(content)
game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(content, "All")
end
local debounce
local is_timeout
local timeout_debounce
local m_sent_durring_timeout = 0
local m_sent = 0
local time_since_no_msg = tick()
print("Started cleverbot")
onPlayerChat = function(chat_type,recipient,message)
if recipient.Name == Players.LocalPlayer.Name then return end
if is_timeout then
m_sent_durring_timeout = m_sent_durring_timeout + 1
wait(45)
if m_sent_durring_timeout >= 4 then
is_timeout = false
return
end
end
m_sent = m_sent + 1
if m_sent == 5 then
m_sent = 0
debounce = false
end
if m_sent > 2 and m_sent <= 4 then
debounce = true
end
local response = send_msg_ai(message)
if response.StatusCode == 429 then
print("Whoa, whoa. Slow down there.")
debounce = true
elseif response.StatusCode == 403 then
print("The bot received too much message. You either have to wait or use a vpn in order to use cleverbot again.")
is_timeout = true
return
end
if tick() - time_since_no_msg > 15 then
debounce = false
wait(math.random(6,10))
end
if debounce then
wait(math.random(8,16))
end
local m = http_service:JSONDecode(response.Body).response
chat(m)
time_since_no_msg = tick()
end
con = Players.PlayerChatted:Connect(onPlayerChat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment