-- GEMINI AI MOBILE - ENGLISH UI, INTRO & WINDOW CONTROLS -- Created by halilibrahimseviml1 local HttpService = game:GetService("HttpService") local CoreGui = game:GetService("CoreGui") local httpRequest = (syn and syn.request) or request or http_request if not httpRequest then return end local apiKey = "AQ.Ab8RN6I_ZrWxF2NQNFmN9GGO8RIPppC_3Q9mqY-wS2f2J3w4cA" local url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-flash-latest:generateContent" if CoreGui:FindFirstChild("GeminiMobileGui") then CoreGui.GeminiMobileGui:Destroy() end local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "GeminiMobileGui" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = CoreGui -------------------------------------------------------------------------------- -- INTRO LOADING SCREEN (Follow Request) -------------------------------------------------------------------------------- local IntroFrame = Instance.new("Frame") IntroFrame.Name = "IntroFrame" IntroFrame.Size = UDim2.new(1, 0, 1, 0) IntroFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 15) IntroFrame.BackgroundTransparency = 0.1 IntroFrame.ZIndex = 100 IntroFrame.Parent = ScreenGui local IntroTextContainer = Instance.new("Frame") IntroTextContainer.Size = UDim2.new(0.8, 0, 0.6, 0) IntroTextContainer.Position = UDim2.new(0.1, 0, 0.2, 0) IntroTextContainer.BackgroundTransparency = 1 IntroTextContainer.ZIndex = 101 IntroTextContainer.Parent = IntroFrame local BigTitle = Instance.new("TextLabel") BigTitle.Size = UDim2.new(1, 0, 0.5, 0) BigTitle.Position = UDim2.new(0, 0, 0, 0) BigTitle.BackgroundTransparency = 1 BigTitle.Font = Enum.Font.GothamBlack BigTitle.Text = "PLEASE FOLLOW halilibrahimseviml1 ON ROBLOX!\nSUPPORT US!" BigTitle.TextColor3 = Color3.fromRGB(255, 60, 60) BigTitle.TextScaled = true BigTitle.TextWrapped = true BigTitle.ZIndex = 102 BigTitle.Parent = IntroTextContainer local SubTitle = Instance.new("TextLabel") SubTitle.Size = UDim2.new(1, 0, 0.3, 0) SubTitle.Position = UDim2.new(0, 0, 0.55, 0) SubTitle.BackgroundTransparency = 1 SubTitle.Font = Enum.Font.GothamBold SubTitle.Text = "Prepared by halilibrahimseviml1\nPlease follow this account on Roblox!" SubTitle.TextColor3 = Color3.fromRGB(255, 255, 255) SubTitle.TextScaled = true SubTitle.TextWrapped = true SubTitle.ZIndex = 102 SubTitle.Parent = IntroTextContainer local ContinueButton = Instance.new("TextButton") ContinueButton.Size = UDim2.new(0, 220, 0, 55) ContinueButton.Position = UDim2.new(0.5, -110, 0.82, 0) ContinueButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255) ContinueButton.Font = Enum.Font.GothamBold ContinueButton.Text = "CONTINUE" ContinueButton.TextColor3 = Color3.fromRGB(255, 255, 255) ContinueButton.TextSize = 18 ContinueButton.ZIndex = 102 ContinueButton.Parent = IntroTextContainer local UICornerBtn = Instance.new("UICorner") UICornerBtn.CornerRadius = UDim.new(0, 8) UICornerBtn.Parent = ContinueButton -------------------------------------------------------------------------------- -- MAIN PANEL UI -------------------------------------------------------------------------------- local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, 280, 0, 360) MainFrame.Position = UDim2.new(0.5, -140, 0.5, -180) MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) MainFrame.BorderSizePixel = 0 MainFrame.Active = true MainFrame.Draggable = true MainFrame.Visible = false -- Hidden until intro is completed MainFrame.Parent = ScreenGui local MainCorner = Instance.new("UICorner") MainCorner.CornerRadius = UDim.new(0, 14) MainCorner.Parent = MainFrame -- Top Bar / Title local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, -75, 0, 40) Title.Position = UDim2.new(0, 10, 0, 0) Title.BackgroundTransparency = 1 Title.Text = "Gemini AI - Mobile" Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.TextSize = 15 Title.Font = Enum.Font.SourceSansBold Title.TextXAlignment = Enum.TextXAlignment.Left Title.Parent = MainFrame -------------------------------------------------------------------------------- -- CLOSE (X) & MINIMIZE (-) BUTTONS (Top Right) -------------------------------------------------------------------------------- local CloseButton = Instance.new("TextButton") CloseButton.Name = "CloseButton" CloseButton.Size = UDim2.new(0, 30, 0, 30) CloseButton.Position = UDim2.new(1, -35, 0, 5) CloseButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) CloseButton.Font = Enum.Font.SourceSansBold CloseButton.Text = "X" CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255) CloseButton.TextSize = 15 CloseButton.ZIndex = 10 CloseButton.Parent = MainFrame local CloseCorner = Instance.new("UICorner") CloseCorner.CornerRadius = UDim.new(0, 6) CloseCorner.Parent = CloseButton local MinimizeButton = Instance.new("TextButton") MinimizeButton.Name = "MinimizeButton" MinimizeButton.Size = UDim2.new(0, 30, 0, 30) MinimizeButton.Position = UDim2.new(1, -70, 0, 5) MinimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100) MinimizeButton.Font = Enum.Font.SourceSansBold MinimizeButton.Text = "-" MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255) MinimizeButton.TextSize = 16 MinimizeButton.ZIndex = 10 MinimizeButton.Parent = MainFrame local MinimizeCorner = Instance.new("UICorner") MinimizeCorner.CornerRadius = UDim.new(0, 6) MinimizeCorner.Parent = MinimizeButton -- Content Container (For minimizing effect) local ContentContainer = Instance.new("Frame") ContentContainer.Name = "ContentContainer" ContentContainer.Size = UDim2.new(1, 0, 1, -40) ContentContainer.Position = UDim2.new(0, 0, 0, 40) ContentContainer.BackgroundTransparency = 1 ContentContainer.Parent = MainFrame -- Center Watermark / Credit Label local CenterWatermark = Instance.new("TextLabel") CenterWatermark.Size = UDim2.new(1, -20, 0, 50) CenterWatermark.Position = UDim2.new(0, 10, 0.5, -25) CenterWatermark.BackgroundTransparency = 1 CenterWatermark.Font = Enum.Font.GothamBold CenterWatermark.Text = "Prepared by halilibrahimseviml1\nPlease follow this account on Roblox" CenterWatermark.TextColor3 = Color3.fromRGB(180, 180, 180) CenterWatermark.TextTransparency = 0.5 CenterWatermark.TextSize = 14 CenterWatermark.TextWrapped = true CenterWatermark.ZIndex = 5 CenterWatermark.Parent = ContentContainer -- ScrollBox Setup local ScrollBox = Instance.new("ScrollingFrame") ScrollBox.Size = UDim2.new(1, -20, 0, 235) ScrollBox.Position = UDim2.new(0, 10, 0, 5) ScrollBox.BackgroundColor3 = Color3.fromRGB(30, 30, 30) ScrollBox.BorderSizePixel = 0 ScrollBox.CanvasSize = UDim2.new(0, 0, 0, 0) ScrollBox.AutomaticCanvasSize = Enum.AutomaticSize.Y ScrollBox.ScrollBarThickness = 4 ScrollBox.ZIndex = 6 ScrollBox.Parent = ContentContainer local ScrollCorner = Instance.new("UICorner") ScrollCorner.CornerRadius = UDim.new(0, 8) ScrollCorner.Parent = ScrollBox local OutputText = Instance.new("TextLabel") OutputText.Size = UDim2.new(1, -10, 1, 0) OutputText.Position = UDim2.new(0, 5, 0, 0) OutputText.BackgroundTransparency = 1 OutputText.TextColor3 = Color3.fromRGB(230, 230, 230) OutputText.TextSize = 13 OutputText.Font = Enum.Font.SourceSans OutputText.TextWrapped = true OutputText.TextXAlignment = Enum.TextXAlignment.Left OutputText.TextYAlignment = Enum.TextYAlignment.Top OutputText.Text = "Connection ready! Type your question below and send." OutputText.ZIndex = 7 OutputText.Parent = ScrollBox local TextBox = Instance.new("TextBox") TextBox.Size = UDim2.new(1, -85, 0, 35) TextBox.Position = UDim2.new(0, 10, 0, 248) TextBox.BackgroundColor3 = Color3.fromRGB(40, 40, 40) TextBox.TextColor3 = Color3.fromRGB(255, 255, 255) TextBox.TextSize = 13 TextBox.Font = Enum.Font.SourceSans TextBox.PlaceholderText = "Type a message..." TextBox.Text = "" TextBox.ZIndex = 6 TextBox.Parent = ContentContainer local TextCorner = Instance.new("UICorner") TextCorner.CornerRadius = UDim.new(0, 8) TextCorner.Parent = TextBox local SendButton = Instance.new("TextButton") SendButton.Size = UDim2.new(0, 65, 0, 35) SendButton.Position = UDim2.new(1, -75, 0, 248) SendButton.BackgroundColor3 = Color3.fromRGB(0, 140, 255) SendButton.TextColor3 = Color3.fromRGB(255, 255, 255) SendButton.TextSize = 14 SendButton.Font = Enum.Font.SourceSansBold SendButton.Text = "Send" SendButton.ZIndex = 6 SendButton.Parent = ContentContainer local ButtonCorner = Instance.new("UICorner") ButtonCorner.CornerRadius = UDim.new(0, 8) ButtonCorner.Parent = SendButton -------------------------------------------------------------------------------- -- API REQUEST LOGIC -------------------------------------------------------------------------------- local function sendMessage() local userText = TextBox.Text if userText == "" then return end OutputText.Text = "Thinking..." TextBox.Text = "" local data = { contents = { { parts = { { text = userText } } } } } local success, response = pcall(function() return httpRequest({ Url = url, Method = "POST", Headers = { ["Content-Type"] = "application/json", ["X-goog-api-key"] = apiKey }, Body = HttpService:JSONEncode(data) }) end) if success and response then if response.StatusCode == 200 then local decodeSuccess, decoded = pcall(function() return HttpService:JSONDecode(response.Body) end) if decodeSuccess and decoded and decoded.candidates then local aiReply = decoded.candidates[1].content.parts[1].text OutputText.Text = aiReply else OutputText.Text = "Failed to parse response." end else OutputText.Text = "Error Code: " .. tostring(response.StatusCode) .. "\n" .. tostring(response.Body) end else OutputText.Text = "Failed to connect." end end SendButton.MouseButton1Click:Connect(sendMessage) TextBox.FocusLost:Connect(function(enterPressed) if enterPressed then sendMessage() end end) -------------------------------------------------------------------------------- -- WINDOW CONTROLS EVENT HANDLERS -------------------------------------------------------------------------------- CloseButton.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) local isMinimized = false MinimizeButton.MouseButton1Click:Connect(function() isMinimized = not isMinimized ContentContainer.Visible = not isMinimized if isMinimized then MainFrame:TweenSize(UDim2.new(0, 280, 0, 40), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true) MinimizeButton.Text = "+" else MainFrame:TweenSize(UDim2.new(0, 280, 0, 360), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true) MinimizeButton.Text = "-" end end) -------------------------------------------------------------------------------- -- INTRO BUTTON EVENT HANDLER -------------------------------------------------------------------------------- ContinueButton.MouseButton1Click:Connect(function() IntroFrame:Destroy() MainFrame.Visible = true end)