AI chat no token need also ABSOLUTE FREE and also is beta
Key RequiredUniversal

AI chat no token need also ABSOLUTE FREE and also is beta

Universal Scriptdaviddavidovich03daviddavidovich03 1.8K views 455 executesUpdated Nov 12, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•79 lines (2483 chars)
-- PolliBot AI Chat Bot for Roblox (Xeno Executor)
-- Uses: https://text.pollinations.ai/prompt:(system)/(text)
-- If AI says "false" → silent (no message in chat)

local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local player = Players.LocalPlayer
local API_BASE = "https://text.pollinations.ai/prompt:"

-- System Prompt (URL-encoded)
local SYSTEM_PROMPT = [[You are PolliBot, an AI in Roblox chat. 
Only reply if the message is addressed to you (contains "ai", "@ai", "bot", "polli", "hey ai").
If not addressed → reply exactly: false
If addressed → give a short, fun reply in English or Russian (match user language).
Only output the text. No quotes. No extra words.]]
    :gsub(" ", "%%20"):gsub("\n", "%%0A")

-- Chat history (last 5 messages)
local chatHistory = {}

-- Send request to Pollinations AI
local function queryAI(userMessage)
    local historyText = table.concat(chatHistory, "%%0A")
    local fullPrompt = (historyText ~= "" and historyText .. "%%0A" or "") .. userMessage

    local url = API_BASE .. SYSTEM_PROMPT .. "/" .. fullPrompt

    local success, response = pcall(function()
        return HttpService:GetAsync(url)
    end)

    if success and response then
        local reply = response:match("^%s*(.-)%s*$")  -- trim
        -- Update history
        table.insert(chatHistory, userMessage)
        if #chatHistory > 5 then
            table.remove(chatHistory, 1)
        end
        return reply
    else
        return "API Error"
    end
end

-- Send message to Roblox chat
local function sendToChat(text)
    pcall(function()
        ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(text, "All")
    end)
end

-- Listen to player chat
player.Chatted:Connect(function(msg)
    if msg == "" then return end

    local speaker = player.Name
    local fullMsg = speaker .. " said: " .. msg

    wait(0.5)  -- Anti-spam delay
    local aiResponse = queryAI(fullMsg)

    -- If AI says "false" → do NOTHING
    if aiResponse:lower() == "false" then
        print("AI: false → ignored")
        return
    end

    -- Otherwise, send to chat
    wait(0.8)
    sendToChat("[PolliBot]: " .. aiResponse)
    print("AI replied: " .. aiResponse)
end)

-- Startup message
wait(2)
sendToChat("[PolliBot]: Online! Say 'ai hello' to talk. Otherwise, I stay silent.")
print("PolliBot is running. Using /prompt:(system)/(text)")

Features & Information

somebody typed : yo hi ai and ai answered
#ai#chat gpt#universal

Community Comments (1)

alperenbro36alperenbro36Nov 13, 2025

Work?

More Scripts for Universal Scripts