local player = game.Players.LocalPlayer -- Create GUI local gui = Instance.new("ScreenGui") gui.Name = "ScriptBotAI" gui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame", gui) frame.Size = UDim2.new(0, 350, 0, 400) frame.Position = UDim2.new(0.5, -175, 0.5, -200) frame.BackgroundColor3 = Color3.fromRGB(40, 0, 60) frame.Active = true frame.Draggable = true -- Title local title = Instance.new("TextLabel", frame) title.Size = UDim2.new(1, 0, 0, 40) title.BackgroundColor3 = Color3.fromRGB(80, 0, 120) title.Text = "🟣 ScriptBot AI" title.TextColor3 = Color3.new(1,1,1) title.TextScaled = true -- Chat display local chatBox = Instance.new("TextLabel", frame) chatBox.Position = UDim2.new(0, 10, 0, 50) chatBox.Size = UDim2.new(1, -20, 0, 250) chatBox.BackgroundColor3 = Color3.fromRGB(20, 0, 30) chatBox.TextColor3 = Color3.new(1,1,1) chatBox.TextWrapped = true chatBox.TextYAlignment = Enum.TextYAlignment.Top chatBox.Text = "AI: Hello! I'm ScriptBot AI." chatBox.TextScaled = false -- Text input local input = Instance.new("TextBox", frame) input.Position = UDim2.new(0, 10, 1, -80) input.Size = UDim2.new(1, -20, 0, 30) input.PlaceholderText = "Type a message..." input.Text = "" -- Send button local send = Instance.new("TextButton", frame) send.Position = UDim2.new(0, 10, 1, -40) send.Size = UDim2.new(1, -20, 0, 30) send.Text = "Send" send.BackgroundColor3 = Color3.fromRGB(100, 0, 150) send.TextColor3 = Color3.new(1,1,1) -- Smart Response System local function getAIResponse(message) message = string.lower(message) -- Greetings if string.find(message, "hello") or string.find(message, "hi") then return "AI: Hey πŸ‘‹ What’s up?" elseif string.find(message, "how are you") then return "AI: I'm running perfectly 😎 What about you?" elseif string.find(message, "who are you") then return "AI: I'm ScriptBot, your custom Roblox AI assistant." elseif string.find(message, "your name") then return "AI: My name is ScriptBot AI 🟣" elseif string.find(message, "roblox") then return "AI: Roblox is awesome πŸ”₯ What do you build?" elseif string.find(message, "script") then return "AI: I can help you make scripts 😈 What do you want to create?" elseif string.find(message, "gui") then return "AI: GUIs make everything cooler. Want to add buttons or effects?" elseif string.find(message, "bye") then return "AI: See you later πŸ‘‹" elseif string.find(message, "?") then return "AI: That’s a good question πŸ€” Tell me more." else local randomReplies = { "AI: Interesting πŸ‘€", "AI: Tell me more...", "AI: I see πŸ€–", "AI: Hmm... explain that again?", "AI: That sounds cool πŸ”₯" } return randomReplies[math.random(1, #randomReplies)] end end -- Send Message send.MouseButton1Click:Connect(function() if input.Text ~= "" then local userMessage = input.Text input.Text = "" chatBox.Text = chatBox.Text .. "\n\nYou: " .. userMessage wait(0.4) chatBox.Text = chatBox.Text .. "\n" .. getAIResponse(userMessage) end end)