local Players = game:GetService("Players") local HttpService = game:GetService("HttpService") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local CONFIG = { URL = "", FileName = "DownloadedText.txt", FileLocation = "Downloads", GuiTitle = "TEXT DOWNLOADER", AutoDeleteGui = false, } local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "TextDownloaderGui" ScreenGui.ResetOnSpawn = false ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.Parent = PlayerGui local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, 420, 0, 320) MainFrame.Position = UDim2.new(0.5, -210, 0.5, -160) MainFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 20) MainFrame.BorderSizePixel = 0 MainFrame.ClipsDescendants = true MainFrame.Parent = ScreenGui local MainCorner = Instance.new("UICorner") MainCorner.CornerRadius = UDim.new(0, 12) MainCorner.Parent = MainFrame local MainStroke = Instance.new("UIStroke") MainStroke.Color = Color3.fromRGB(0, 255, 136) MainStroke.Thickness = 1.5 MainStroke.Parent = MainFrame local TopBar = Instance.new("Frame") TopBar.Name = "TopBar" TopBar.Size = UDim2.new(1, 0, 0, 44) TopBar.BackgroundColor3 = Color3.fromRGB(20, 20, 28) TopBar.BorderSizePixel = 0 TopBar.Parent = MainFrame local TopBarCorner = Instance.new("UICorner") TopBarCorner.CornerRadius = UDim.new(0, 12) TopBarCorner.Parent = TopBar local TopBarFix = Instance.new("Frame") TopBarFix.Size = UDim2.new(1, 0, 0, 12) TopBarFix.Position = UDim2.new(0, 0, 1, -12) TopBarFix.BackgroundColor3 = Color3.fromRGB(20, 20, 28) TopBarFix.BorderSizePixel = 0 TopBarFix.Parent = TopBar local TitleIcon = Instance.new("TextLabel") TitleIcon.Size = UDim2.new(0, 28, 0, 28) TitleIcon.Position = UDim2.new(0, 14, 0, 8) TitleIcon.BackgroundTransparency = 1 TitleIcon.Text = "" TitleIcon.TextColor3 = Color3.fromRGB(0, 255, 136) TitleIcon.TextSize = 20 TitleIcon.Font = Enum.Font.GothamBold TitleIcon.Parent = TopBar local TitleLabel = Instance.new("TextLabel") TitleLabel.Size = UDim2.new(0, 250, 0, 44) TitleLabel.Position = UDim2.new(0, 46, 0, 0) TitleLabel.BackgroundTransparency = 1 TitleLabel.Text = CONFIG.GuiTitle TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) TitleLabel.TextSize = 16 TitleLabel.Font = Enum.Font.GothamBold TitleLabel.TextXAlignment = Enum.TextXAlignment.Left TitleLabel.Parent = TopBar local CloseButton = Instance.new("TextButton") CloseButton.Name = "CloseButton" CloseButton.Size = UDim2.new(0, 32, 0, 32) CloseButton.Position = UDim2.new(1, -40, 0, 6) CloseButton.BackgroundColor3 = Color3.fromRGB(255, 60, 60) CloseButton.BorderSizePixel = 0 CloseButton.Text = "×" CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255) CloseButton.TextSize = 22 CloseButton.Font = Enum.Font.GothamBold CloseButton.Parent = TopBar local CloseCorner = Instance.new("UICorner") CloseCorner.CornerRadius = UDim.new(0, 8) CloseCorner.Parent = CloseButton local ContentFrame = Instance.new("Frame") ContentFrame.Name = "Content" ContentFrame.Size = UDim2.new(1, 0, 1, -44) ContentFrame.Position = UDim2.new(0, 0, 0, 44) ContentFrame.BackgroundTransparency = 1 ContentFrame.Parent = MainFrame local URLContainer = Instance.new("Frame") URLContainer.Size = UDim2.new(0.9, 0, 0, 58) URLContainer.Position = UDim2.new(0.05, 0, 0, 16) URLContainer.BackgroundColor3 = Color3.fromRGB(25, 25, 35) URLContainer.BorderSizePixel = 0 URLContainer.Parent = ContentFrame local URLCorner = Instance.new("UICorner") URLCorner.CornerRadius = UDim.new(0, 8) URLCorner.Parent = URLContainer local URLLabel = Instance.new("TextLabel") URLLabel.Size = UDim2.new(1, -16, 0, 18) URLLabel.Position = UDim2.new(0, 8, 0, 4) URLLabel.BackgroundTransparency = 1 URLLabel.Text = "URL" URLLabel.TextColor3 = Color3.fromRGB(0, 255, 136) URLLabel.TextSize = 11 URLLabel.Font = Enum.Font.GothamBold URLLabel.TextXAlignment = Enum.TextXAlignment.Left URLLabel.Parent = URLContainer local URLBox = Instance.new("TextBox") URLBox.Name = "URLBox" URLBox.Size = UDim2.new(1, -16, 0, 28) URLBox.Position = UDim2.new(0, 8, 0, 24) URLBox.BackgroundTransparency = 1 URLBox.Text = CONFIG.URL URLBox.PlaceholderText = "https://..." URLBox.TextColor3 = Color3.fromRGB(255, 255, 255) URLBox.PlaceholderColor3 = Color3.fromRGB(100, 100, 120) URLBox.TextSize = 13 URLBox.Font = Enum.Font.Gotham URLBox.ClearTextOnFocus = false URLBox.TextXAlignment = Enum.TextXAlignment.Left URLBox.Parent = URLContainer local FileContainer = Instance.new("Frame") FileContainer.Size = UDim2.new(0.9, 0, 0, 58) FileContainer.Position = UDim2.new(0.05, 0, 0, 86) FileContainer.BackgroundColor3 = Color3.fromRGB(25, 25, 35) FileContainer.BorderSizePixel = 0 FileContainer.Parent = ContentFrame local FileCorner = Instance.new("UICorner") FileCorner.CornerRadius = UDim.new(0, 8) FileCorner.Parent = FileContainer local FileLabel = Instance.new("TextLabel") FileLabel.Size = UDim2.new(1, -16, 0, 18) FileLabel.Position = UDim2.new(0, 8, 0, 4) FileLabel.BackgroundTransparency = 1 FileLabel.Text = "FILE NAME" FileLabel.TextColor3 = Color3.fromRGB(0, 255, 136) FileLabel.TextSize = 11 FileLabel.Font = Enum.Font.GothamBold FileLabel.TextXAlignment = Enum.TextXAlignment.Left FileLabel.Parent = FileContainer local FileNameBox = Instance.new("TextBox") FileNameBox.Name = "FileNameBox" FileNameBox.Size = UDim2.new(1, -16, 0, 28) FileNameBox.Position = UDim2.new(0, 8, 0, 24) FileNameBox.BackgroundTransparency = 1 FileNameBox.Text = CONFIG.FileName FileNameBox.PlaceholderText = "filename.txt" FileNameBox.TextColor3 = Color3.fromRGB(255, 255, 255) FileNameBox.PlaceholderColor3 = Color3.fromRGB(100, 100, 120) FileNameBox.TextSize = 13 FileNameBox.Font = Enum.Font.Gotham FileNameBox.ClearTextOnFocus = false FileNameBox.TextXAlignment = Enum.TextXAlignment.Left FileNameBox.Parent = FileContainer local StatusFrame = Instance.new("Frame") StatusFrame.Size = UDim2.new(0.9, 0, 0, 36) StatusFrame.Position = UDim2.new(0.05, 0, 0, 156) StatusFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 30) StatusFrame.BorderSizePixel = 0 StatusFrame.Parent = ContentFrame local StatusCorner = Instance.new("UICorner") StatusCorner.CornerRadius = UDim.new(0, 6) StatusCorner.Parent = StatusFrame local StatusLabel = Instance.new("TextLabel") StatusLabel.Name = "Status" StatusLabel.Size = UDim2.new(1, -12, 1, 0) StatusLabel.Position = UDim2.new(0, 6, 0, 0) StatusLabel.BackgroundTransparency = 1 StatusLabel.Text = "Ready" StatusLabel.TextColor3 = Color3.fromRGB(150, 150, 170) StatusLabel.TextSize = 13 StatusLabel.Font = Enum.Font.Gotham StatusLabel.TextWrapped = true StatusLabel.Parent = StatusFrame local DownloadButton = Instance.new("TextButton") DownloadButton.Name = "DownloadButton" DownloadButton.Size = UDim2.new(0.9, 0, 0, 44) DownloadButton.Position = UDim2.new(0.05, 0, 0, 206) DownloadButton.BackgroundColor3 = Color3.fromRGB(0, 255, 136) DownloadButton.BorderSizePixel = 0 DownloadButton.Text = "DOWNLOAD" DownloadButton.TextColor3 = Color3.fromRGB(15, 15, 20) DownloadButton.TextSize = 15 DownloadButton.Font = Enum.Font.GothamBold DownloadButton.Parent = ContentFrame local ButtonCorner = Instance.new("UICorner") ButtonCorner.CornerRadius = UDim.new(0, 10) ButtonCorner.Parent = DownloadButton local ButtonStroke = Instance.new("UIStroke") ButtonStroke.Color = Color3.fromRGB(0, 200, 100) ButtonStroke.Thickness = 2 ButtonStroke.Parent = DownloadButton local dragging = false local dragInput, dragStart, startPos TopBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = MainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) TopBar.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) local function tweenColor(obj, prop, target, duration) TweenService:Create(obj, TweenInfo.new(duration or 0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {[prop] = target}):Play() end local function updateStatus(text, color) StatusLabel.Text = text StatusLabel.TextColor3 = color or Color3.fromRGB(150, 150, 170) end local function createFile(text, fileName) local folder = workspace:FindFirstChild(CONFIG.FileLocation) if not folder then folder = Instance.new("Folder") folder.Name = CONFIG.FileLocation folder.Parent = workspace end local file = Instance.new("StringValue") file.Name = fileName:gsub("%.txt$", "") file.Value = text file.Parent = folder return file, folder end local function writeToFileSystem(text, filePath) if writefile then local success, err = pcall(function() writefile(filePath, text) end) return success, err end return false, "writefile not available" end local function downloadText() local url = URLBox.Text local fileName = FileNameBox.Text if url == "" or url == "https://..." then updateStatus("Enter a valid URL", Color3.fromRGB(255, 80, 80)) return end if fileName == "" then updateStatus("Enter a file name", Color3.fromRGB(255, 80, 80)) return end updateStatus("Fetching...", Color3.fromRGB(255, 200, 100)) DownloadButton.Text = "FETCHING..." tweenColor(DownloadButton, "BackgroundColor3", Color3.fromRGB(100, 100, 100)) DownloadButton.Active = false local success, result = pcall(function() return game:HttpGet(url, true) end) if not success then updateStatus("Failed: " .. tostring(result), Color3.fromRGB(255, 80, 80)) DownloadButton.Text = "DOWNLOAD" tweenColor(DownloadButton, "BackgroundColor3", Color3.fromRGB(0, 255, 136)) DownloadButton.Active = true return end updateStatus("Saving...", Color3.fromRGB(100, 255, 150)) local filePath = fileName if not fileName:match("%.txt$") then filePath = fileName .. ".txt" end local fileWritten, writeErr = writeToFileSystem(result, filePath) if fileWritten then if setclipboard then setclipboard(filePath) end updateStatus("Download has been added to workspace", Color3.fromRGB(0, 255, 136)) createFile(result, fileName) else local file, folder = createFile(result, fileName) local explorerPath = "workspace." .. CONFIG.FileLocation .. "." .. file.Name if setclipboard then setclipboard(explorerPath) end updateStatus("Download has been added to workspace", Color3.fromRGB(0, 255, 136)) end DownloadButton.Text = "DONE" tweenColor(DownloadButton, "BackgroundColor3", Color3.fromRGB(0, 200, 100)) wait(2) if CONFIG.AutoDeleteGui then ScreenGui:Destroy() else DownloadButton.Text = "DOWNLOAD" tweenColor(DownloadButton, "BackgroundColor3", Color3.fromRGB(0, 255, 136)) DownloadButton.Active = true end end DownloadButton.MouseButton1Click:Connect(downloadText) CloseButton.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) DownloadButton.MouseEnter:Connect(function() if DownloadButton.Active ~= false then tweenColor(DownloadButton, "BackgroundColor3", Color3.fromRGB(50, 255, 150)) end end) DownloadButton.MouseLeave:Connect(function() if DownloadButton.Active ~= false then tweenColor(DownloadButton, "BackgroundColor3", Color3.fromRGB(0, 255, 136)) end end) CloseButton.MouseEnter:Connect(function() tweenColor(CloseButton, "BackgroundColor3", Color3.fromRGB(255, 100, 100)) end) CloseButton.MouseLeave:Connect(function() tweenColor(CloseButton, "BackgroundColor3", Color3.fromRGB(255, 60, 60)) end) getgenv().DownloadText = function(url, fileName) local success, result = pcall(function() return game:HttpGet(url, true) end) if success then local name = fileName or "Download.txt" if writefile then writefile(name, result) if setclipboard then setclipboard(name) end return true, result, name else local folder = workspace:FindFirstChild(CONFIG.FileLocation) or Instance.new("Folder") if not folder.Parent then folder.Name = CONFIG.FileLocation folder.Parent = workspace end local file = Instance.new("StringValue") file.Name = name:gsub("%.txt$", "") file.Value = result file.Parent = folder return true, result, "workspace." .. CONFIG.FileLocation .. "." .. file.Name end else return false, tostring(result), nil end end