-- MAP EXPORTER WITH GUI also yes this is ai i know i jst thought this script worked very well local player = game.Players.LocalPlayer local gui = Instance.new("ScreenGui") gui.Name = "MapExporter" gui.Parent = player:WaitForChild("PlayerGui") -- Main frame local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 600, 0, 500) frame.Position = UDim2.new(0.5, -300, 0.5, -250) frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2) frame.BackgroundTransparency = 0.1 frame.BorderSizePixel = 0 frame.Active = true frame.Draggable = true frame.Parent = gui -- Title local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.Position = UDim2.new(0, 0, 0, 0) title.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3) title.BorderSizePixel = 0 title.Text = "Map Exporter" title.TextColor3 = Color3.new(1, 1, 1) title.Font = Enum.Font.SourceSansBold title.TextSize = 18 title.Parent = frame -- Close button local close = Instance.new("TextButton") close.Size = UDim2.new(0, 30, 0, 30) close.Position = UDim2.new(1, -30, 0, 0) close.BackgroundColor3 = Color3.new(0.8, 0.2, 0.2) close.BorderSizePixel = 0 close.Text = "X" close.TextColor3 = Color3.new(1, 1, 1) close.Font = Enum.Font.SourceSansBold close.TextSize = 18 close.Parent = frame close.MouseButton1Click:Connect(function() gui:Destroy() end) -- Export button local exportBtn = Instance.new("TextButton") exportBtn.Size = UDim2.new(0, 150, 0, 30) exportBtn.Position = UDim2.new(0.5, -75, 0, 40) exportBtn.BackgroundColor3 = Color3.new(0.2, 0.6, 0.2) exportBtn.BorderSizePixel = 0 exportBtn.Text = "EXPORT MAP" exportBtn.TextColor3 = Color3.new(1, 1, 1) exportBtn.Font = Enum.Font.SourceSansBold exportBtn.TextSize = 16 exportBtn.Parent = frame -- Copy buttons local copyBtn1 = Instance.new("TextButton") copyBtn1.Size = UDim2.new(0, 180, 0, 30) copyBtn1.Position = UDim2.new(0.5, -270, 0, 80) copyBtn1.BackgroundColor3 = Color3.new(0.2, 0.4, 0.8) copyBtn1.BorderSizePixel = 0 copyBtn1.Text = "COPY FULL HTML" copyBtn1.TextColor3 = Color3.new(1, 1, 1) copyBtn1.Font = Enum.Font.SourceSansBold copyBtn1.TextSize = 14 copyBtn1.Parent = frame local copyBtn2 = Instance.new("TextButton") copyBtn2.Size = UDim2.new(0, 180, 0, 30) copyBtn2.Position = UDim2.new(0.5, 90, 0, 80) copyBtn2.BackgroundColor3 = Color3.new(0.8, 0.4, 0.2) copyBtn2.BorderSizePixel = 0 copyBtn2.Text = "COPY JSON DATA" copyBtn2.TextColor3 = Color3.new(1, 1, 1) copyBtn2.Font = Enum.Font.SourceSansBold copyBtn2.TextSize = 14 copyBtn2.Parent = frame -- Status text local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, -20, 0, 50) statusLabel.Position = UDim2.new(0, 10, 0, 120) statusLabel.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15) statusLabel.BorderSizePixel = 0 statusLabel.Text = "Ready to export..." statusLabel.TextColor3 = Color3.new(1, 1, 0) statusLabel.Font = Enum.Font.SourceSans statusLabel.TextSize = 14 statusLabel.TextWrapped = true statusLabel.Parent = frame -- Text box for output (will show summary only) local textBox = Instance.new("ScrollingFrame") textBox.Size = UDim2.new(1, -20, 1, -200) textBox.Position = UDim2.new(0, 10, 0, 180) textBox.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1) textBox.BorderSizePixel = 0 textBox.CanvasSize = UDim2.new(0, 0, 10, 0) textBox.ScrollBarThickness = 10 textBox.Parent = frame local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 0, 20) textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = Color3.new(0, 1, 0) textLabel.Font = Enum.Font.Code textLabel.TextSize = 12 textLabel.TextXAlignment = Enum.TextXAlignment.Left textLabel.TextYAlignment = Enum.TextYAlignment.Top textLabel.Text = "Click EXPORT MAP to generate..." textLabel.TextWrapped = true textLabel.Parent = textBox -- Store the generated data local generatedHTML = "" local generatedJSON = "" -- Function to update text box local function setOutput(text) -- Split text into lines to count local lines = {} for line in string.gmatch(text, "[^\r\n]+") do table.insert(lines, line) end local lineCount = #lines -- Limit to 1000 lines max for display if lineCount > 1000 then local displayText = table.concat(lines, "\n", 1, 100) .. "\n\n... (truncated, " .. lineCount .. " total lines) ...\n\n" .. table.concat(lines, "\n", lineCount-50, lineCount) textLabel.Text = displayText lineCount = 150 -- Approximate else textLabel.Text = text end textLabel.Size = UDim2.new(1, 0, 0, lineCount * 16) textBox.CanvasSize = UDim2.new(0, 0, 0, lineCount * 16 + 20) end -- Copy to clipboard function with fallback local function copyToClipboard(text, type) local success = pcall(function() setclipboard(text) end) if success then statusLabel.Text = "✅ " .. type .. " copied to clipboard! Paste into a text file." statusLabel.TextColor3 = Color3.new(0, 1, 0) else -- Show in text box as fallback setOutput(text) statusLabel.Text = "⚠️ Couldn't copy directly. Select all text below and copy manually." statusLabel.TextColor3 = Color3.new(1, 1, 0) end end -- Export function exportBtn.MouseButton1Click:Connect(function() statusLabel.Text = "Collecting map data... (this may take a moment)" statusLabel.TextColor3 = Color3.new(1, 1, 0) task.wait() local mapData = { name = tostring(game.Name), parts = {}, spawns = {} } -- Collect all parts in workspace for _, obj in ipairs(workspace:GetDescendants()) do if obj:IsA("BasePart") and obj.Transparency < 1 then -- Skip players local isPlayerPart = false for _, p in ipairs(game.Players:GetPlayers()) do if p.Character and (obj:IsDescendantOf(p.Character) or obj.Parent == p.Character) then isPlayerPart = true break end end if not isPlayerPart then -- Get color safely local r, g, b = 0.5, 0.5, 0.5 local brickColor = obj.BrickColor if brickColor then local color = brickColor.Color if color then r = color.R g = color.G b = color.B end elseif obj.Color then r = obj.Color.R g = obj.Color.G b = obj.Color.B end local partData = { name = tostring(obj.Name), class = tostring(obj.ClassName), position = {obj.Position.X, obj.Position.Y, obj.Position.Z}, size = {obj.Size.X, obj.Size.Y, obj.Size.Z}, color = {r, g, b}, rotation = {obj.Orientation.X, obj.Orientation.Y, obj.Orientation.Z} } table.insert(mapData.parts, partData) end end end -- Collect spawns for _, obj in ipairs(workspace:GetDescendants()) do if obj.Name and type(obj.Name) == "string" and obj.Name:lower():find("spawn") and obj:IsA("BasePart") then table.insert(mapData.spawns, {obj.Position.X, obj.Position.Y, obj.Position.Z}) end end statusLabel.Text = "Encoding map data... (" .. #mapData.parts .. " parts)" task.wait() -- Encode JSON local jsonSuccess, jsonResult = pcall(function() return game:GetService("HttpService"):JSONEncode(mapData) end) if not jsonSuccess then statusLabel.Text = "❌ Error encoding map data. Map might be too large." statusLabel.TextColor3 = Color3.new(1, 0, 0) return end generatedJSON = jsonResult statusLabel.Text = "Generating HTML... (this may take a moment)" task.wait() -- FIXED HTML with proper camera controls generatedHTML = [[ ]] .. tostring(game.Name) .. [[ Map
Map: ]] .. tostring(game.Name) .. [[ | Parts: ]] .. #mapData.parts .. [[ | Spawns: ]] .. #mapData.spawns .. [[
WASD: Fly | Mouse: Look | Click to lock mouse | Shift: Speed boost | Space/Ctrl: Up/Down
Ready
]] statusLabel.Text = "✅ Map exported! " .. #mapData.parts .. " parts, " .. #mapData.spawns .. " spawns. HTML size: " .. string.len(generatedHTML) .. " chars" statusLabel.TextColor3 = Color3.new(0, 1, 0) -- Show summary in text box setOutput("✅ MAP EXPORTED SUCCESSFULLY!\n\n" .. "Game: " .. tostring(game.Name) .. "\n" .. "Parts: " .. #mapData.parts .. "\n" .. "Spawns: " .. #mapData.spawns .. "\n\n" .. "HTML Size: " .. string.len(generatedHTML) .. " characters\n" .. "JSON Size: " .. string.len(generatedJSON) .. " characters\n\n" .. "Click 'COPY FULL HTML' to copy the complete HTML file\n" .. "Click 'COPY JSON DATA' to copy just the map data\n\n" .. "First 500 chars of HTML:\n" .. string.sub(generatedHTML, 1, 500) .. "...") end) -- Copy HTML button copyBtn1.MouseButton1Click:Connect(function() if generatedHTML and generatedHTML ~= "" then copyToClipboard(generatedHTML, "HTML") else statusLabel.Text = "❌ Generate the map first!" statusLabel.TextColor3 = Color3.new(1, 0, 0) end end) -- Copy JSON button copyBtn2.MouseButton1Click:Connect(function() if generatedJSON and generatedJSON ~= "" then copyToClipboard(generatedJSON, "JSON") else statusLabel.Text = "❌ Generate the map first!" statusLabel.TextColor3 = Color3.new(1, 0, 0) end end) print("✅ GUI LOADED)