-- ============================================= -- Smart AI Chat System for Roblox Exploits -- Mobile-Friendly + Copy Button on AI Messages -- ============================================= local Players = game:GetService("Players") local HttpService = game:GetService("HttpService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- ============== CONFIG ============== local GROQ_API_KEY = "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" local AI_ENABLED = true local CLEAN_MODE = true local MAX_HISTORY = 12 local OPEN_KEY = Enum.KeyCode.RightShift local BAD_WORDS = {"fuck", "shit", "bitch", "asshole", "cunt", "nigger", "faggot", "damn", "hell"} local history = {} -- ============== CREATE GUI (Mobile Optimized) ============== local screenGui = Instance.new("ScreenGui") screenGui.Name = "SmartAIChat" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 320, 0, 380) mainFrame.Position = UDim2.new(0.5, -160, 0.5, -190) mainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 30) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 35) title.BackgroundColor3 = Color3.fromRGB(30, 30, 50) title.Text = " 🤖 Smart AI - Roblox Helper" title.TextColor3 = Color3.fromRGB(100, 200, 255) title.Font = Enum.Font.GothamBold title.TextSize = 15 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = mainFrame local closeBtn = Instance.new("TextButton") closeBtn.Size = UDim2.new(0, 30, 0, 30) closeBtn.Position = UDim2.new(1, -33, 0, 3) closeBtn.BackgroundTransparency = 1 closeBtn.Text = "✕" closeBtn.TextColor3 = Color3.fromRGB(255, 80, 80) closeBtn.TextSize = 18 closeBtn.Parent = title local chatFrame = Instance.new("ScrollingFrame") chatFrame.Name = "ChatFrame" chatFrame.Size = UDim2.new(1, -16, 1, -125) chatFrame.Position = UDim2.new(0, 8, 0, 42) chatFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 25) chatFrame.ScrollBarThickness = 6 chatFrame.ScrollBarImageColor3 = Color3.fromRGB(100, 200, 255) chatFrame.CanvasSize = UDim2.new(0, 0, 0, 0) chatFrame.Parent = mainFrame local uiList = Instance.new("UIListLayout") uiList.Padding = UDim.new(0, 8) uiList.SortOrder = Enum.SortOrder.LayoutOrder uiList.Parent = chatFrame uiList:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() chatFrame.CanvasSize = UDim2.new(0, 0, 0, uiList.AbsoluteContentSize.Y) end) -- Input Area local inputBox = Instance.new("TextBox") inputBox.Size = UDim2.new(1, -95, 0, 45) inputBox.Position = UDim2.new(0, 8, 1, -53) inputBox.PlaceholderText = "Ask me anything..." inputBox.BackgroundColor3 = Color3.fromRGB(30, 30, 45) inputBox.TextColor3 = Color3.fromRGB(220, 220, 230) inputBox.PlaceholderColor3 = Color3.fromRGB(140, 140, 160) inputBox.Font = Enum.Font.Gotham inputBox.TextSize = 15 inputBox.ClearTextOnFocus = false inputBox.Parent = mainFrame local sendBtn = Instance.new("TextButton") sendBtn.Size = UDim2.new(0, 80, 0, 45) sendBtn.Position = UDim2.new(1, -88, 1, -53) sendBtn.BackgroundColor3 = Color3.fromRGB(70, 130, 255) sendBtn.Text = "Send" sendBtn.TextColor3 = Color3.new(1,1,1) sendBtn.Font = Enum.Font.GothamBold sendBtn.TextSize = 15 sendBtn.Parent = mainFrame local typingLabel = Instance.new("TextLabel") typingLabel.Size = UDim2.new(0, 140, 0, 22) typingLabel.Position = UDim2.new(0, 12, 1, -85) typingLabel.BackgroundTransparency = 1 typingLabel.Text = "AI is thinking..." typingLabel.TextColor3 = Color3.fromRGB(120, 200, 255) typingLabel.Font = Enum.Font.Gotham typingLabel.TextSize = 14 typingLabel.Visible = false typingLabel.Parent = mainFrame -- Toggles local cleanToggle = Instance.new("TextButton") cleanToggle.Size = UDim2.new(0, 95, 0, 26) cleanToggle.Position = UDim2.new(1, -105, 0, 5) cleanToggle.BackgroundColor3 = CLEAN_MODE and Color3.fromRGB(60, 180, 60) or Color3.fromRGB(180, 100, 60) cleanToggle.Text = CLEAN_MODE and "Clean: ON" or "Clean: OFF" cleanToggle.TextColor3 = Color3.new(1,1,1) cleanToggle.Font = Enum.Font.Gotham cleanToggle.TextSize = 13 cleanToggle.Parent = mainFrame local aiToggle = Instance.new("TextButton") aiToggle.Size = UDim2.new(0, 78, 0, 26) aiToggle.Position = UDim2.new(1, -200, 0, 5) aiToggle.BackgroundColor3 = Color3.fromRGB(60, 180, 60) aiToggle.Text = "AI: ON" aiToggle.TextColor3 = Color3.new(1,1,1) aiToggle.Font = Enum.Font.Gotham aiToggle.TextSize = 13 aiToggle.Parent = mainFrame -- ============== HELPER FUNCTIONS ============== local function addMessage(text, isAI) local msgFrame = Instance.new("Frame") msgFrame.Size = UDim2.new(1, -12, 0, 0) msgFrame.BackgroundTransparency = 1 msgFrame.AutomaticSize = Enum.AutomaticSize.Y msgFrame.Parent = chatFrame local msg = Instance.new("TextLabel") msg.Size = UDim2.new(1, isAI and -45 or 0, 0, 0) -- leave space for copy button msg.BackgroundTransparency = 1 msg.Text = text msg.TextWrapped = true msg.TextXAlignment = Enum.TextXAlignment.Left msg.Font = Enum.Font.Gotham msg.TextSize = 15 msg.TextColor3 = isAI and Color3.fromRGB(120, 220, 255) or Color3.fromRGB(200, 230, 255) msg.AutomaticSize = Enum.AutomaticSize.Y msg.Parent = msgFrame -- Copy button (only for AI messages) if isAI then local copyBtn = Instance.new("TextButton") copyBtn.Size = UDim2.new(0, 38, 0, 24) copyBtn.Position = UDim2.new(1, -42, 0, 2) copyBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 70) copyBtn.Text = "Copy" copyBtn.TextColor3 = Color3.fromRGB(180, 220, 255) copyBtn.Font = Enum.Font.Gotham copyBtn.TextSize = 12 copyBtn.Parent = msgFrame copyBtn.MouseButton1Click:Connect(function() if setclipboard then setclipboard(text) copyBtn.Text = "Copied!" copyBtn.BackgroundColor3 = Color3.fromRGB(60, 180, 60) task.delay(1.2, function() if copyBtn and copyBtn.Parent then copyBtn.Text = "Copy" copyBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 70) end end) else copyBtn.Text = "No clipboard" task.delay(1.5, function() if copyBtn and copyBtn.Parent then copyBtn.Text = "Copy" end end) end end) end task.defer(function() chatFrame.CanvasPosition = Vector2.new(0, chatFrame.AbsoluteCanvasSize.Y) end) end local function filterBadWords(text) local lower = string.lower(text) for _, word in BAD_WORDS do if string.find(lower, word) then return "[message filtered]" end end return text end local function getSystemPrompt() if CLEAN_MODE then return "You are a helpful, intelligent, and professional AI assistant for Roblox scripting and exploiting. Always keep responses clean, polite, and family-friendly. Never use any swear words or toxic language." else return "You are a helpful, intelligent AI assistant for Roblox scripting and exploiting. Be direct, clear, and useful. Give working Lua code when asked." end end local function getAIResponse(userMessage) table.insert(history, {role = "user", content = userMessage}) if #history > MAX_HISTORY then table.remove(history, 1) end local messages = {{role = "system", content = getSystemPrompt()}} for _, msg in history do table.insert(messages, msg) end local body = HttpService:JSONEncode({ model = "llama-3.1-8b-instant", messages = messages, temperature = 0.7, max_tokens = 800 }) local success, response = pcall(function() return HttpService:RequestAsync({ Url = "https://api.groq.com/openai/v1/chat/completions", Method = "POST", Headers = { ["Authorization"] = "Bearer " .. GROQ_API_KEY, ["Content-Type"] = "application/json" }, Body = body }) end) if not success or not response.Success then return "Sorry, I couldn't reach the AI service right now..." end local data = HttpService:JSONDecode(response.Body) return data.choices[1].message.content end local function sendMessage() if not AI_ENABLED then return end local msg = inputBox.Text if msg == "" then return end msg = filterBadWords(msg) addMessage("You: " .. msg, false) inputBox.Text = "" typingLabel.Visible = true task.wait(0.4) local response = getAIResponse(msg) typingLabel.Visible = false addMessage("SmartAI: " .. response, true) table.insert(history, {role = "assistant", content = response}) end -- ============== CONNECTIONS ============== aiToggle.MouseButton1Click:Connect(function() AI_ENABLED = not AI_ENABLED aiToggle.Text = AI_ENABLED and "AI: ON" or "AI: OFF" aiToggle.BackgroundColor3 = AI_ENABLED and Color3.fromRGB(60,180,60) or Color3.fromRGB(180,60,60) end) cleanToggle.MouseButton1Click:Connect(function() CLEAN_MODE = not CLEAN_MODE cleanToggle.Text = CLEAN_MODE and "Clean: ON" or "Clean: OFF" cleanToggle.BackgroundColor3 = CLEAN_MODE and Color3.fromRGB(60,180,60) or Color3.fromRGB(180,100,60) addMessage("SmartAI: Clean mode is now " .. (CLEAN_MODE and "enabled" or "disabled") .. ".", true) end) closeBtn.MouseButton1Click:Connect(function() screenGui.Enabled = false end) sendBtn.MouseButton1Click:Connect(sendMessage) inputBox.FocusLost:Connect(function(enter) if enter then sendMessage() end end) UserInputService.InputBegan:Connect(function(input, gp) if gp then return end if input.KeyCode == OPEN_KEY then screenGui.Enabled = not screenGui.Enabled end end) -- Welcome task.wait(0.6) addMessage("SmartAI: Hi~ I'm ready to help with Roblox scripts... Clean mode is " .. (CLEAN_MODE and "ON" or "OFF") .. ".", true) print("🤖 Smart AI Chat (Mobile + Copy) loaded - Press RightShift to open.")