--======================================================== -- PIXEL CAMOUFLAGE + ESP CHAMELEON -- Modern Professional UI | R6 / R15 -- Client-side LocalScript --======================================================== local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui") --======================================================== -- CONFIGURATION --======================================================== local FIGURE_NAMES = { PixelFigure = true, PaintDummy = true, } local PAINTING_NAME = "PixelPainting" local BLOCK_NAME = "Block" local BODY_NAME = "Body" local ESP_MODEL_PATH = { "ChameleonOpponent", "Figure", } local MAX_PLANE_DISTANCE = 8 local ESP_COLOR = Color3.fromRGB(255, 0, 0) local ESP_FILL_TRANSPARENCY = 0.15 local ESP_OUTLINE_TRANSPARENCY = 0 --======================================================== -- UI THEME --======================================================== local THEME = { Background = Color3.fromRGB(17, 19, 29), Surface = Color3.fromRGB(25, 29, 43), SurfaceLight = Color3.fromRGB(34, 39, 56), Accent = Color3.fromRGB(139, 92, 246), AccentLight = Color3.fromRGB(167, 139, 250), Cyan = Color3.fromRGB(45, 212, 191), Text = Color3.fromRGB(245, 247, 255), Muted = Color3.fromRGB(155, 165, 187), Green = Color3.fromRGB(16, 185, 129), Red = Color3.fromRGB(239, 83, 103), Border = Color3.fromRGB(57, 64, 86), } --======================================================== -- STATE --======================================================== local originalAppearance = {} local paintedParts = {} local espHighlight local espEnabled = false local draggingEnabled = true local panelVisible = true local screenGui local mainFrame local statusLabel local espButton local camouflageButton local hideButton local showButton local espConnection local dragConnection --======================================================== -- HELPERS --======================================================== local function isBasePart(instance) return instance and instance:IsA("BasePart") end local function getAllParts(root) local result = {} if not root then return result end for _, instance in ipairs(root:GetDescendants()) do if instance:IsA("BasePart") then table.insert(result, instance) end end return result end local function getNamedParts(root, wantedName) local result = {} if not root then return result end for _, instance in ipairs(root:GetDescendants()) do if instance:IsA("BasePart") and instance.Name == wantedName then table.insert(result, instance) end end return result end local function findNamedModels() local result = {} for _, instance in ipairs(workspace:GetDescendants()) do if instance:IsA("Model") and FIGURE_NAMES[instance.Name] then table.insert(result, instance) end end return result end local function getPaintings() local result = {} for _, instance in ipairs(workspace:GetDescendants()) do if instance:IsA("Model") and instance.Name == PAINTING_NAME then table.insert(result, instance) end end return result end local function setStatus(message) if statusLabel and statusLabel.Parent then statusLabel.Text = message end end --======================================================== -- SAVE AND RESTORE ORIGINAL APPEARANCE --======================================================== local function saveOriginal(part) if originalAppearance[part] then return end local data = { Color = part.Color, Material = part.Material, MaterialVariant = part.MaterialVariant, TextureObjects = {}, } for _, child in ipairs(part:GetChildren()) do if child:IsA("Texture") or child:IsA("Decal") then data.TextureObjects[child] = { Color3 = child.Color3, Transparency = child.Transparency, } end end originalAppearance[part] = data end local function paintBody(part, color) if not isBasePart(part) or not part.Parent then return end saveOriginal(part) part.Color = color part.Material = Enum.Material.SmoothPlastic for _, child in ipairs(part:GetChildren()) do if child:IsA("Texture") or child:IsA("Decal") then child.Color3 = color end end paintedParts[part] = true end local function restoreAll() for part, data in pairs(originalAppearance) do if part and part.Parent then part.Color = data.Color part.Material = data.Material pcall(function() part.MaterialVariant = data.MaterialVariant end) for texture, textureData in pairs(data.TextureObjects) do if texture and texture.Parent == part then texture.Color3 = textureData.Color3 texture.Transparency = textureData.Transparency end end end end table.clear(originalAppearance) table.clear(paintedParts) end --======================================================== -- PROJECT PART INTO PAINTING SPACE --======================================================== local function getProjectedBounds(part, paintingCFrame) local half = part.Size * 0.5 local minX, maxX = math.huge, -math.huge local minY, maxY = math.huge, -math.huge local minZ, maxZ = math.huge, -math.huge for _, sx in ipairs({-1, 1}) do for _, sy in ipairs({-1, 1}) do for _, sz in ipairs({-1, 1}) do local cornerLocal = Vector3.new( half.X * sx, half.Y * sy, half.Z * sz ) local cornerWorld = part.CFrame:PointToWorldSpace(cornerLocal) local p = paintingCFrame:PointToObjectSpace(cornerWorld) minX = math.min(minX, p.X) maxX = math.max(maxX, p.X) minY = math.min(minY, p.Y) maxY = math.max(maxY, p.Y) minZ = math.min(minZ, p.Z) maxZ = math.max(maxZ, p.Z) end end end return { minX = minX, maxX = maxX, minY = minY, maxY = maxY, minZ = minZ, maxZ = maxZ, centerZ = (minZ + maxZ) * 0.5, width = maxX - minX, height = maxY - minY, } end --======================================================== -- RECTANGLE OVERLAP --======================================================== local function getOverlapArea(a, b) local overlapX = math.max( 0, math.min(a.maxX, b.maxX) - math.max(a.minX, b.minX) ) local overlapY = math.max( 0, math.min(a.maxY, b.maxY) - math.max(a.minY, b.minY) ) return overlapX * overlapY end local function getPlaneGap(a, b) if a.maxZ < b.minZ then return b.minZ - a.maxZ elseif b.maxZ < a.minZ then return a.minZ - b.maxZ end return 0 end --======================================================== -- FIND RELEVANT PAINTING --======================================================== local function findPaintingForFigure(figure, paintings) local figureParts = getNamedParts(figure, BODY_NAME) if #figureParts == 0 then figureParts = getAllParts(figure) end if #figureParts == 0 then return nil end local figureCenter = figure:GetPivot().Position local bestPainting = nil local bestDistance = math.huge for _, painting in ipairs(paintings) do local blocks = getNamedParts(painting, BLOCK_NAME) if #blocks > 0 then local nearest = math.huge for _, block in ipairs(blocks) do local distance = (block.Position - figureCenter).Magnitude if distance < nearest then nearest = distance end end if nearest < bestDistance then bestDistance = nearest bestPainting = painting end end end return bestPainting end --======================================================== -- BUILD PIXEL DATA --======================================================== local function buildPixelGrid(painting) local pixels = {} local paintingCFrame = painting:GetPivot() for _, block in ipairs(getNamedParts(painting, BLOCK_NAME)) do table.insert(pixels, { part = block, color = block.Color, bounds = getProjectedBounds(block, paintingCFrame), }) end return pixels, paintingCFrame end --======================================================== -- CHOOSE PIXEL BY ACTUAL OVERLAP --======================================================== local function findBestPixel(body, pixels, paintingCFrame) local bodyBounds = getProjectedBounds(body, paintingCFrame) local bestPixel = nil local bestArea = 0 local bestGap = math.huge for _, pixel in ipairs(pixels) do local blockBounds = pixel.bounds local gap = getPlaneGap(bodyBounds, blockBounds) if gap <= MAX_PLANE_DISTANCE then local area = getOverlapArea(bodyBounds, blockBounds) if area > bestArea then bestArea = area bestGap = gap bestPixel = pixel elseif area > 0 and math.abs(area - bestArea) < 0.0001 and gap < bestGap then bestGap = gap bestPixel = pixel end end end if bestArea <= 0 then return nil end return bestPixel end --======================================================== -- APPLY CAMOUFLAGE --======================================================== local function applyCamouflage() local figures = findNamedModels() local paintings = getPaintings() if #figures == 0 then setStatus("No PixelFigure/PaintDummy found") return end if #paintings == 0 then setStatus("No PixelPainting found") return end local paintedCount = 0 local unmatchedCount = 0 for _, figure in ipairs(figures) do local painting = findPaintingForFigure(figure, paintings) if painting then local pixels, paintingCFrame = buildPixelGrid(painting) local bodies = getNamedParts(figure, BODY_NAME) for _, body in ipairs(bodies) do if body.Transparency < 1 then local pixel = findBestPixel( body, pixels, paintingCFrame ) if pixel then paintBody(body, pixel.color) paintedCount += 1 else unmatchedCount += 1 end end end end end setStatus( "Applied: " .. paintedCount .. " | No overlap: " .. unmatchedCount ) end --======================================================== -- ESP CHAMELEON --======================================================== local function findESPTarget() local current = workspace for _, name in ipairs(ESP_MODEL_PATH) do current = current:FindFirstChild(name) if not current then return nil end end return current end local function removeESP() if espHighlight then espHighlight:Destroy() espHighlight = nil end end local function updateESP() if not espEnabled then removeESP() return end local target = findESPTarget() if not target then removeESP() return end if espHighlight and espHighlight.Parent ~= target then removeESP() end if not espHighlight then espHighlight = Instance.new("Highlight") espHighlight.Name = "PixelCamouflageESP" espHighlight.Adornee = target espHighlight.Parent = target end espHighlight.Enabled = true espHighlight.FillColor = ESP_COLOR espHighlight.OutlineColor = ESP_COLOR espHighlight.FillTransparency = ESP_FILL_TRANSPARENCY espHighlight.OutlineTransparency = ESP_OUTLINE_TRANSPARENCY espHighlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop end --======================================================== -- UI HELPERS --======================================================== local function addCorner(object, radius) local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, radius) corner.Parent = object return corner end local function addStroke(object, color, thickness, transparency) local stroke = Instance.new("UIStroke") stroke.Color = color stroke.Thickness = thickness or 1 stroke.Transparency = transparency or 0 stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border stroke.Parent = object return stroke end local function addGradient(object, colorA, colorB, rotation) local gradient = Instance.new("UIGradient") gradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, colorA), ColorSequenceKeypoint.new(1, colorB), }) gradient.Rotation = rotation or 0 gradient.Parent = object return gradient end local function makeLabel( parent, name, text, size, position, color, font, textSize ) local label = Instance.new("TextLabel") label.Name = name label.Size = size label.Position = position label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = color label.Font = font or Enum.Font.Gotham label.TextSize = textSize or 13 label.TextXAlignment = Enum.TextXAlignment.Left label.TextYAlignment = Enum.TextYAlignment.Center label.Parent = parent return label end --======================================================== -- UI CREATION --======================================================== local function createUI() local old = PlayerGui:FindFirstChild("PixelCamouflageUI") if old then old:Destroy() end screenGui = Instance.new("ScreenGui") screenGui.Name = "PixelCamouflageUI" screenGui.ResetOnSpawn = false screenGui.IgnoreGuiInset = false screenGui.DisplayOrder = 50 screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = PlayerGui -- Main window mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.Size = UDim2.new(0, 290, 0, 250) mainFrame.Position = UDim2.new(0, 16, 0.32, 0) mainFrame.BackgroundColor3 = THEME.Background mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.ClipsDescendants = true mainFrame.Parent = screenGui addCorner(mainFrame, 16) -- UIStroke verde SOLO para el marco grande addStroke(mainFrame, THEME.Green, 2, 0) -- Header icon local logo = Instance.new("Frame") logo.Name = "Logo" logo.Size = UDim2.new(0, 39, 0, 39) logo.Position = UDim2.new(0, 14, 0, 15) logo.BackgroundColor3 = THEME.SurfaceLight logo.BorderSizePixel = 0 logo.Parent = mainFrame addCorner(logo, 12) local logoText = makeLabel( logo, "LogoEmoji", "🎨", UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 0, 0), THEME.Text, Enum.Font.GothamBold, 22 ) logoText.TextXAlignment = Enum.TextXAlignment.Center -- Header text makeLabel( mainFrame, "Title", "PIXEL CAMOUFLAGE", UDim2.new(1, -110, 0, 23), UDim2.new(0, 62, 0, 16), THEME.Text, Enum.Font.GothamBold, 15 ) makeLabel( mainFrame, "Subtitle", "CAMOUFLAGE CONTROL CENTER", UDim2.new(1, -90, 0, 17), UDim2.new(0, 63, 0, 38), THEME.Muted, Enum.Font.GothamMedium, 9 ) -- Online indicator local onlineDot = Instance.new("Frame") onlineDot.Name = "OnlineDot" onlineDot.Size = UDim2.new(0, 7, 0, 7) onlineDot.Position = UDim2.new(1, -22, 0, 24) onlineDot.BackgroundColor3 = THEME.Cyan onlineDot.BorderSizePixel = 0 onlineDot.Parent = mainFrame addCorner(onlineDot, 10) -- Header divider: invisible local divider = Instance.new("Frame") divider.Name = "HeaderDivider" divider.Size = UDim2.new(1, -28, 0, 1) divider.Position = UDim2.new(0, 14, 0, 64) divider.BackgroundTransparency = 1 divider.BorderSizePixel = 0 divider.Parent = mainFrame -- Section heading makeLabel( mainFrame, "ActionsHeading", "QUICK ACTIONS", UDim2.new(1, -28, 0, 18), UDim2.new(0, 14, 0, 72), THEME.Muted, Enum.Font.GothamBold, 10 ) -- Main button factory: no text strokes local function makeButton(name, text, y, height, color) local button = Instance.new("TextButton") button.Name = name button.Size = UDim2.new(1, -28, 0, height) button.Position = UDim2.new(0, 14, 0, y) button.BackgroundColor3 = color button.BorderSizePixel = 0 button.Text = text button.TextColor3 = THEME.Text button.TextSize = 13 button.Font = Enum.Font.GothamBold button.AutoButtonColor = false button.TextWrapped = false button.Parent = mainFrame addCorner(button, 10) return button end -- Camouflage button: same normal color as ESP OFF camouflageButton = makeButton( "CamouflageApply", "🎨 APPLY CAMOUFLAGE", 94, 39, THEME.SurfaceLight ) -- ESP button espButton = makeButton( "ESPButton", "ESP CHAMELEON", 141, 36, THEME.SurfaceLight ) -- Status section local statusCard = Instance.new("Frame") statusCard.Name = "StatusCard" statusCard.Size = UDim2.new(1, -28, 0, 37) statusCard.Position = UDim2.new(0, 14, 0, 185) statusCard.BackgroundColor3 = THEME.Surface statusCard.BorderSizePixel = 0 statusCard.Parent = mainFrame addCorner(statusCard, 9) local statusDot = Instance.new("Frame") statusDot.Name = "StatusDot" statusDot.Size = UDim2.new(0, 6, 0, 6) statusDot.Position = UDim2.new(0, 10, 0.5, -3) statusDot.BackgroundColor3 = THEME.Cyan statusDot.BorderSizePixel = 0 statusDot.Parent = statusCard addCorner(statusDot, 10) statusLabel = makeLabel( statusCard, "Status", "Ready", UDim2.new(1, -27, 1, 0), UDim2.new(0, 21, 0, 0), THEME.Muted, Enum.Font.GothamMedium, 10 ) statusLabel.TextWrapped = true -- Hide button hideButton = Instance.new("TextButton") hideButton.Name = "HidePanel" hideButton.Size = UDim2.new(0, 27, 0, 27) hideButton.Position = UDim2.new(1, -40, 0, 20) hideButton.BackgroundColor3 = THEME.SurfaceLight hideButton.BorderSizePixel = 0 hideButton.Text = "—" hideButton.TextColor3 = THEME.Muted hideButton.TextSize = 17 hideButton.Font = Enum.Font.GothamBold hideButton.AutoButtonColor = false hideButton.Parent = mainFrame addCorner(hideButton, 8) -- Footer makeLabel( mainFrame, "Footer", "PIXEL SYSTEM • MOBILE READY", UDim2.new(1, -28, 0, 12), UDim2.new(0, 14, 1, -14), THEME.Muted, Enum.Font.GothamMedium, 8 ) -- Floating show button: only emoji, green outline showButton = Instance.new("TextButton") showButton.Name = "ShowPanel" showButton.Size = UDim2.new(0, 54, 0, 48) showButton.AnchorPoint = Vector2.new(0.5, 0) showButton.Position = UDim2.new(0.5, 0, 0, 12) showButton.BackgroundColor3 = THEME.Background showButton.BorderSizePixel = 0 showButton.Text = "🎨" showButton.TextColor3 = THEME.Text showButton.TextSize = 27 showButton.Font = Enum.Font.GothamBold showButton.AutoButtonColor = false showButton.Visible = false showButton.Active = true showButton.Parent = screenGui addCorner(showButton, 14) -- UIStroke verde SOLO para el botón 🎨 addStroke(showButton, THEME.Green, 2, 0) --==================================================== -- CAMOUFLAGE BUTTON PRESS EFFECT --==================================================== local normalCamouflageColor = THEME.SurfaceLight local pressedCamouflageColor = THEME.Green local camouflagePressed = false local function restoreCamouflageButton() if not camouflageButton or not camouflageButton.Parent then return end camouflagePressed = false camouflageButton.BackgroundColor3 = normalCamouflageColor end camouflageButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then camouflagePressed = true camouflageButton.BackgroundColor3 = pressedCamouflageColor end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then if camouflagePressed then restoreCamouflageButton() end end end) camouflageButton.Activated:Connect(function() local originalText = camouflageButton.Text camouflageButton.Text = "⏳ APPLYING..." task.defer(function() local success, err = pcall(applyCamouflage) if not success then warn("[PixelCamouflage] " .. tostring(err)) setStatus("Error applying camouflage") end if camouflageButton and camouflageButton.Parent then camouflageButton.Text = originalText restoreCamouflageButton() end end) end) --==================================================== -- ESP SWITCH --==================================================== local function refreshESPButton() espButton.Text = "ESP CHAMELEON" local oldSwitch = espButton:FindFirstChild("Switch") if oldSwitch then oldSwitch:Destroy() end local switch = Instance.new("Frame") switch.Name = "Switch" switch.Size = UDim2.new(0, 42, 0, 22) switch.Position = UDim2.new(1, -53, 0.5, -11) switch.BorderSizePixel = 0 switch.BackgroundColor3 = espEnabled and THEME.Green or THEME.Border switch.Parent = espButton addCorner(switch, 20) local knob = Instance.new("Frame") knob.Name = "Knob" knob.Size = UDim2.new(0, 16, 0, 16) knob.Position = espEnabled and UDim2.new(1, -19, 0.5, -8) or UDim2.new(0, 3, 0.5, -8) knob.BackgroundColor3 = THEME.Text knob.BorderSizePixel = 0 knob.Parent = switch addCorner(knob, 20) if espEnabled then espButton.BackgroundColor3 = Color3.fromRGB(24, 91, 79) espButton.TextColor3 = Color3.fromRGB(153, 255, 222) updateESP() else espButton.BackgroundColor3 = THEME.SurfaceLight espButton.TextColor3 = THEME.Text removeESP() end end espButton.Activated:Connect(function() espEnabled = not espEnabled refreshESPButton() end) --==================================================== -- HIDE / SHOW PANEL --==================================================== hideButton.Activated:Connect(function() panelVisible = false mainFrame.Visible = false showButton.Visible = true end) local showDragged = false showButton.Activated:Connect(function() if showDragged then return end panelVisible = true mainFrame.Visible = true showButton.Visible = false end) --==================================================== -- DRAG FLOATING SHOW BUTTON --==================================================== local showDragStart local showStartPosition local showActiveInput showButton.InputBegan:Connect(function(input) if not draggingEnabled then return end if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then showActiveInput = input showDragStart = input.Position showStartPosition = showButton.Position showDragged = false end end) UserInputService.InputChanged:Connect(function(input) if not draggingEnabled or not showDragStart or not showStartPosition then return end local isMouseMove = showActiveInput and showActiveInput.UserInputType == Enum.UserInputType.MouseButton1 and input.UserInputType == Enum.UserInputType.MouseMovement local isTouchMove = showActiveInput and showActiveInput.UserInputType == Enum.UserInputType.Touch and input == showActiveInput if isMouseMove or isTouchMove then local delta = input.Position - showDragStart if delta.Magnitude > 5 then showDragged = true end showButton.Position = UDim2.new( showStartPosition.X.Scale, showStartPosition.X.Offset + delta.X, showStartPosition.Y.Scale, showStartPosition.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input) if showActiveInput and ( input == showActiveInput or input.UserInputType == Enum.UserInputType.MouseButton1 ) then showDragStart = nil showActiveInput = nil if showDragged then task.delay(0.2, function() showDragged = false end) end end end) --==================================================== -- DRAG MAIN PANEL WITH MOUSE OR TOUCH --==================================================== local dragStart local startPosition local activeInput mainFrame.InputBegan:Connect(function(input) if not draggingEnabled then return end if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then activeInput = input dragStart = input.Position startPosition = mainFrame.Position end end) UserInputService.InputChanged:Connect(function(input) if not draggingEnabled or not dragStart then return end local isMouseMove = activeInput and activeInput.UserInputType == Enum.UserInputType.MouseButton1 and input.UserInputType == Enum.UserInputType.MouseMovement local isTouchMove = activeInput and activeInput.UserInputType == Enum.UserInputType.Touch and input == activeInput if isMouseMove or isTouchMove then local delta = input.Position - dragStart mainFrame.Position = UDim2.new( startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input) if activeInput and ( input == activeInput or input.UserInputType == Enum.UserInputType.MouseButton1 ) then dragStart = nil activeInput = nil end end) refreshESPButton() end --======================================================== -- CHAT COMMAND: UNNO --======================================================== local function onChatMessage(message) if string.upper(message) == "UNNO" then draggingEnabled = not draggingEnabled if draggingEnabled then setStatus("Panel dragging: ON") else setStatus("Panel dragging: LOCKED") end end end Player.Chatted:Connect(onChatMessage) --======================================================== -- INITIALIZE --======================================================== createUI() updateESP() espConnection = RunService.Heartbeat:Connect(function() if espEnabled then updateESP() end end) --======================================================== -- CLEANUP --======================================================== screenGui.Destroying:Connect(function() restoreAll() removeESP() if espConnection then espConnection:Disconnect() espConnection = nil end end)