--[[ ZOMBIE DEFENSE HUB v1.0 Integrated Script for Roblox Executor Features: - ESP Weapon Boxes - ESP Bosses (with HP bar & distance) - ESP Zombies (Pumpkin, Secret, Bat, Regular) - Aim Assist - Noclip - Walkspeed & JumpPower sliders - Xray - Infinite Jump Themes: Light, Dark, Aqua, Transparent --]] local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local HttpService = game:GetService("HttpService") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera local ZombieDefenseHub = { Version = "1.0", CurrentTheme = "Dark", GUI = nil, Features = {} } function ESP_WeaponBoxes(state) if not getgenv().WeaponBoxesESP then getgenv().WeaponBoxesESP = { Enabled = false, Boxes = {}, Connection = nil, SearchInterval = nil } end local ESP = getgenv().WeaponBoxesESP local function CreateESPForBox(hitbox) if ESP.Boxes[hitbox] then return end if not hitbox or not hitbox.Parent then return end local espData = {} local highlight = Instance.new("Highlight") highlight.Name = "WeaponBoxESP_Highlight" highlight.Adornee = hitbox highlight.FillColor = Color3.fromRGB(0, 255, 0) highlight.OutlineColor = Color3.fromRGB(0, 200, 0) highlight.FillTransparency = 0.5 highlight.OutlineTransparency = 0 highlight.Parent = hitbox espData.Highlight = highlight local billboard = Instance.new("BillboardGui") billboard.Name = "WeaponBoxESP_Label" billboard.Adornee = hitbox billboard.Size = UDim2.new(0, 150, 0, 40) billboard.StudsOffset = Vector3.new(0, 3, 0) billboard.AlwaysOnTop = true billboard.MaxDistance = 500 local textLabel = Instance.new("TextLabel") textLabel.Name = "ESPText" textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.BackgroundTransparency = 1 textLabel.Text = "WEAPON BOX" textLabel.TextColor3 = Color3.fromRGB(0, 255, 0) textLabel.TextStrokeTransparency = 0 textLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) textLabel.Font = Enum.Font.GothamBold textLabel.TextSize = 16 textLabel.Parent = billboard billboard.Parent = hitbox espData.Billboard = billboard ESP.Boxes[hitbox] = espData hitbox.AncestryChanged:Connect(function(_, parent) if not parent then if ESP.Boxes[hitbox] then if ESP.Boxes[hitbox].Highlight then ESP.Boxes[hitbox].Highlight:Destroy() end if ESP.Boxes[hitbox].Billboard then ESP.Boxes[hitbox].Billboard:Destroy() end ESP.Boxes[hitbox] = nil end end end) end local function ScanForBoxes() local workspace = game:GetService("Workspace") for _, descendant in ipairs(workspace:GetDescendants()) do if descendant:IsA("BasePart") or descendant:IsA("Model") then local name = descendant.Name:lower() if name == "hitbox" or name:find("hitbox") then CreateESPForBox(descendant) end end end end local function ClearAllESP() for hitbox, espData in pairs(ESP.Boxes) do if espData.Highlight and espData.Highlight.Parent then espData.Highlight:Destroy() end if espData.Billboard and espData.Billboard.Parent then espData.Billboard:Destroy() end end ESP.Boxes = {} end if state == true or state == "on" or state == "enable" then if ESP.Enabled then return end ESP.Enabled = true ScanForBoxes() ESP.SearchInterval = task.spawn(function() while ESP.Enabled do task.wait(2) if ESP.Enabled then ScanForBoxes() end end end) ESP.Connection = game:GetService("Workspace").DescendantAdded:Connect(function(descendant) if not ESP.Enabled then return end task.wait(0.1) if descendant:IsA("BasePart") or descendant:IsA("Model") then local name = descendant.Name:lower() if name == "hitbox" or name:find("hitbox") then CreateESPForBox(descendant) end end end) elseif state == false or state == "off" or state == "disable" then if not ESP.Enabled then return end ESP.Enabled = false if ESP.Connection then ESP.Connection:Disconnect() ESP.Connection = nil end ClearAllESP() end end function ESP_Bosses(state) if not _G.BossESP then _G.BossESP = { Active = false, Connections = {}, ESPObjects = {} } end local ESP = _G.BossESP local function ClearESP() for _, connection in pairs(ESP.Connections) do if connection then connection:Disconnect() end end ESP.Connections = {} for _, obj in pairs(ESP.ESPObjects) do if obj.Billboard then obj.Billboard:Destroy() end if obj.Highlight then obj.Highlight:Destroy() end end ESP.ESPObjects = {} end local function CreateBossESP(boss) if ESP.ESPObjects[boss] then return end local highlight = Instance.new("Highlight") highlight.Name = "BossESP_Highlight" highlight.FillColor = Color3.fromRGB(255, 0, 0) highlight.OutlineColor = Color3.fromRGB(255, 100, 100) highlight.FillTransparency = 0.5 highlight.OutlineTransparency = 0 highlight.Parent = boss local billboard = Instance.new("BillboardGui") billboard.Name = "BossESP_GUI" billboard.AlwaysOnTop = true billboard.Size = UDim2.new(0, 200, 0, 80) billboard.StudsOffset = Vector3.new(0, 3, 0) billboard.Parent = boss local nameLabel = Instance.new("TextLabel") nameLabel.Name = "BossName" nameLabel.Size = UDim2.new(1, 0, 0, 25) nameLabel.BackgroundTransparency = 1 nameLabel.Text = boss.Name nameLabel.TextColor3 = Color3.fromRGB(255, 50, 50) nameLabel.TextStrokeTransparency = 0 nameLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) nameLabel.Font = Enum.Font.GothamBold nameLabel.TextSize = 18 nameLabel.Parent = billboard local distanceLabel = Instance.new("TextLabel") distanceLabel.Name = "Distance" distanceLabel.Size = UDim2.new(1, 0, 0, 20) distanceLabel.Position = UDim2.new(0, 0, 0, 22) distanceLabel.BackgroundTransparency = 1 distanceLabel.Text = "Dist: -- m" distanceLabel.TextColor3 = Color3.fromRGB(255, 255, 255) distanceLabel.TextStrokeTransparency = 0 distanceLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) distanceLabel.Font = Enum.Font.Gotham distanceLabel.TextSize = 14 distanceLabel.Parent = billboard local humanoid = boss:FindFirstChildOfClass("Humanoid") or boss:FindFirstChild("Humanoid") if humanoid then local hpBackground = Instance.new("Frame") hpBackground.Name = "HPBackground" hpBackground.Size = UDim2.new(0.8, 0, 0, 12) hpBackground.Position = UDim2.new(0.1, 0, 0, 45) hpBackground.BackgroundColor3 = Color3.fromRGB(50, 50, 50) hpBackground.BorderSizePixel = 0 hpBackground.Parent = billboard local hpFill = Instance.new("Frame") hpFill.Name = "HPFill" hpFill.Size = UDim2.new(1, 0, 1, 0) hpFill.BackgroundColor3 = Color3.fromRGB(0, 255, 0) hpFill.BorderSizePixel = 0 hpFill.Parent = hpBackground local hpText = Instance.new("TextLabel") hpText.Name = "HPText" hpText.Size = UDim2.new(1, 0, 1, 0) hpText.BackgroundTransparency = 1 hpText.Text = math.floor(humanoid.Health) .. " / " .. math.floor(humanoid.MaxHealth) hpText.TextColor3 = Color3.fromRGB(255, 255, 255) hpText.TextStrokeTransparency = 0 hpText.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) hpText.Font = Enum.Font.GothamBold hpText.TextSize = 10 hpText.Parent = hpBackground local hpConnection = humanoid:GetPropertyChangedSignal("Health"):Connect(function() local healthPercent = math.clamp(humanoid.Health / humanoid.MaxHealth, 0, 1) hpFill.Size = UDim2.new(healthPercent, 0, 1, 0) hpFill.BackgroundColor3 = Color3.fromRGB(255 * (1 - healthPercent), 255 * healthPercent, 0) hpText.Text = math.floor(humanoid.Health) .. " / " .. math.floor(humanoid.MaxHealth) end) table.insert(ESP.Connections, hpConnection) end ESP.ESPObjects[boss] = { Billboard = billboard, Highlight = highlight } end local function UpdateDistances() local player = game.Players.LocalPlayer if not player or not player.Character then return end local character = player.Character local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Torso") if not humanoidRootPart then return end local playerPosition = humanoidRootPart.Position for boss, espData in pairs(ESP.ESPObjects) do if boss and boss.Parent and espData.Billboard then local distanceLabel = espData.Billboard:FindFirstChild("Distance") if distanceLabel then local distance = (playerPosition - boss.Position).Magnitude distanceLabel.Text = "Dist: " .. math.floor(distance) .. " m" end end end end local function ScanAndCreateESP() for _, obj in pairs(workspace:GetDescendants()) do if obj:IsA("BasePart") or obj:IsA("Model") then if string.sub(obj.Name, 1, 5) == "Boss_" then CreateBossESP(obj) end end end end if state then if ESP.Active then return end ESP.Active = true ScanAndCreateESP() local distanceConnection = game:GetService("RunService").Heartbeat:Connect(function() if ESP.Active then UpdateDistances() end end) table.insert(ESP.Connections, distanceConnection) local descendantConnection = workspace.DescendantAdded:Connect(function(descendant) if ESP.Active and (descendant:IsA("BasePart") or descendant:IsA("Model")) then if string.sub(descendant.Name, 1, 5) == "Boss_" then wait(0.1) CreateBossESP(descendant) end end end) table.insert(ESP.Connections, descendantConnection) local removedConnection = workspace.DescendantRemoving:Connect(function(descendant) if ESP.ESPObjects[descendant] then if ESP.ESPObjects[descendant].Billboard then ESP.ESPObjects[descendant].Billboard:Destroy() end if ESP.ESPObjects[descendant].Highlight then ESP.ESPObjects[descendant].Highlight:Destroy() end ESP.ESPObjects[descendant] = nil end end) table.insert(ESP.Connections, removedConnection) else ESP.Active = false ClearESP() end end function AimAssist(state) local SETTINGS = { MaxDistance = 200, FOV = 120, Smoothness = 0.08, AimKey = Enum.UserInputType.MouseButton2, TargetPart = "Head", TeamCheck = false } local aimConnection = nil local currentTarget = nil local function IsValidTarget(model) if not model or model == LocalPlayer.Character then return false end local humanoid = model:FindFirstChildOfClass("Humanoid") local head = model:FindFirstChild(SETTINGS.TargetPart) if not humanoid or not head then return false end if humanoid.Health <= 0 then return false end return true end local function GetAngle(v1, v2) return math.deg(math.acos(math.clamp(v1:Dot(v2) / (v1.Magnitude * v2.Magnitude), -1, 1))) end local function GetScreenDistance(position) local screenPos, onScreen = Camera:WorldToViewportPoint(position) if not onScreen then return math.huge end local centerX = Camera.ViewportSize.X / 2 local centerY = Camera.ViewportSize.Y / 2 return math.sqrt((screenPos.X - centerX)^2 + (screenPos.Y - centerY)^2) end local function FindBestTarget() local bestTarget = nil local bestDistance = math.huge local cameraPos = Camera.CFrame.Position local cameraLook = Camera.CFrame.LookVector for _, model in ipairs(workspace:GetDescendants()) do if model:IsA("Model") and IsValidTarget(model) then local head = model:FindFirstChild(SETTINGS.TargetPart) if head then local headPos = head.Position local distance = (headPos - cameraPos).Magnitude if distance <= SETTINGS.MaxDistance then local direction = (headPos - cameraPos).Unit local angle = GetAngle(cameraLook, direction) if angle <= SETTINGS.FOV / 2 then local screenDist = GetScreenDistance(headPos) if screenDist < bestDistance then bestDistance = screenDist bestTarget = head end end end end end end return bestTarget end local function SmoothAim(target) if not target or not target.Parent then return end local targetPos = target.Position local cameraPos = Camera.CFrame.Position local newCFrame = CFrame.new(cameraPos, targetPos) local smoothedCFrame = Camera.CFrame:Lerp(newCFrame, SETTINGS.Smoothness) Camera.CFrame = smoothedCFrame end local function AimLoop() local isAimKeyPressed = UserInputService:IsMouseButtonPressed(SETTINGS.AimKey) if isAimKeyPressed then if not currentTarget or not currentTarget.Parent or not IsValidTarget(currentTarget.Parent) then currentTarget = FindBestTarget() end if currentTarget then SmoothAim(currentTarget) end else currentTarget = nil end end if state then if aimConnection then aimConnection:Disconnect() end aimConnection = RunService.RenderStepped:Connect(AimLoop) else if aimConnection then aimConnection:Disconnect() aimConnection = nil end currentTarget = nil end end function ESP_ZombieType(state, typeName, color) if not _G[typeName.."ESP"] then _G[typeName.."ESP"] = { Active = false, Connections = {}, ESPObjects = {} } end local ESP = _G[typeName.."ESP"] local function ClearESP() for _, connection in pairs(ESP.Connections) do if connection then connection:Disconnect() end end ESP.Connections = {} for _, obj in pairs(ESP.ESPObjects) do if obj.Billboard then obj.Billboard:Destroy() end if obj.Highlight then obj.Highlight:Destroy() end end ESP.ESPObjects = {} end local function CreateESP(zombie) if ESP.ESPObjects[zombie] then return end local highlight = Instance.new("Highlight") highlight.Name = typeName.."ESP_Highlight" highlight.FillColor = color highlight.OutlineColor = color highlight.FillTransparency = 0.5 highlight.OutlineTransparency = 0 highlight.Parent = zombie local billboard = Instance.new("BillboardGui") billboard.Name = typeName.."ESP_GUI" billboard.AlwaysOnTop = true billboard.Size = UDim2.new(0, 120, 0, 40) billboard.StudsOffset = Vector3.new(0, 2.5, 0) billboard.Parent = zombie local nameLabel = Instance.new("TextLabel") nameLabel.Name = "ZombieName" nameLabel.Size = UDim2.new(1, 0, 1, 0) nameLabel.BackgroundTransparency = 1 nameLabel.Text = typeName:upper() nameLabel.TextColor3 = color nameLabel.TextStrokeTransparency = 0 nameLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) nameLabel.Font = Enum.Font.GothamBold nameLabel.TextSize = 14 nameLabel.Parent = billboard ESP.ESPObjects[zombie] = { Billboard = billboard, Highlight = highlight } end local function ScanAndCreateESP() for _, obj in pairs(workspace:GetDescendants()) do if (obj:IsA("BasePart") or obj:IsA("Model")) and obj.Name:lower() == typeName:lower() then CreateESP(obj) end end end if state then if ESP.Active then return end ESP.Active = true ScanAndCreateESP() local descendantConnection = workspace.DescendantAdded:Connect(function(descendant) if ESP.Active and (descendant:IsA("BasePart") or descendant:IsA("Model")) and descendant.Name:lower() == typeName:lower() then wait(0.1) CreateESP(descendant) end end) table.insert(ESP.Connections, descendantConnection) local removedConnection = workspace.DescendantRemoving:Connect(function(descendant) if ESP.ESPObjects[descendant] then if ESP.ESPObjects[descendant].Billboard then ESP.ESPObjects[descendant].Billboard:Destroy() end if ESP.ESPObjects[descendant].Highlight then ESP.ESPObjects[descendant].Highlight:Destroy() end ESP.ESPObjects[descendant] = nil end end) table.insert(ESP.Connections, removedConnection) else ESP.Active = false ClearESP() end end function ESP_Pumpkin(state) ESP_ZombieType(state, "pumpkin", Color3.fromRGB(255, 165, 0)) end function ESP_Secret(state) ESP_ZombieType(state, "secret", Color3.fromRGB(128, 0, 128)) end function ESP_Bat(state) ESP_ZombieType(state, "bat", Color3.fromRGB(0, 100, 255)) end function ESP_Zombie(state) ESP_ZombieType(state, "zombie", Color3.fromRGB(0, 255, 0)) end function Noclip(state) if not _G.NoclipConnection then _G.NoclipConnection = nil end if state then if _G.NoclipConnection then return end _G.NoclipConnection = game:GetService("RunService").Stepped:Connect(function() local player = game.Players.LocalPlayer if player and player.Character then for _, part in pairs(player.Character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end end end) else if _G.NoclipConnection then _G.NoclipConnection:Disconnect() _G.NoclipConnection = nil end end end function SetWalkspeed(speed) local player = game.Players.LocalPlayer if player and player.Character then local humanoid = player.Character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.WalkSpeed = math.clamp(speed, 0, 100) end end end function SetJumpPower(power) local player = game.Players.LocalPlayer if player and player.Character then local humanoid = player.Character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.JumpPower = math.clamp(power, 0, 150) end end end function Xray(state) for _, part in pairs(workspace:GetDescendants()) do if part:IsA("BasePart") and not part:IsDescendantOf(game.Players.LocalPlayer.Character) then if state then part.LocalTransparencyModifier = 0.7 else part.LocalTransparencyModifier = 0 end end end end function InfiniteJump(state) if not _G.InfiniteJumpConnection then _G.InfiniteJumpConnection = nil end if state then if _G.InfiniteJumpConnection then return end _G.InfiniteJumpConnection = game:GetService("UserInputService").JumpRequest:Connect(function() local player = game.Players.LocalPlayer if player and player.Character then local humanoid = player.Character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end end) else if _G.InfiniteJumpConnection then _G.InfiniteJumpConnection:Disconnect() _G.InfiniteJumpConnection = nil end end end local function CreateGUI() local Themes = { Light = { Background = Color3.fromRGB(245, 245, 245), Header = Color3.fromRGB(255, 255, 255), Tab = Color3.fromRGB(230, 230, 230), TabActive = Color3.fromRGB(255, 193, 7), Text = Color3.fromRGB(33, 33, 33), TextSecondary = Color3.fromRGB(100, 100, 100), ToggleOff = Color3.fromRGB(200, 200, 200), ToggleOn = Color3.fromRGB(255, 193, 7), Slider = Color3.fromRGB(255, 193, 7), Button = Color3.fromRGB(255, 193, 7), Shadow = Color3.fromRGB(0, 0, 0) }, Dark = { Background = Color3.fromRGB(30, 30, 35), Header = Color3.fromRGB(40, 40, 45), Tab = Color3.fromRGB(50, 50, 55), TabActive = Color3.fromRGB(108, 117, 125), Text = Color3.fromRGB(255, 255, 255), TextSecondary = Color3.fromRGB(180, 180, 180), ToggleOff = Color3.fromRGB(70, 70, 75), ToggleOn = Color3.fromRGB(108, 117, 125), Slider = Color3.fromRGB(108, 117, 125), Button = Color3.fromRGB(108, 117, 125), Shadow = Color3.fromRGB(0, 0, 0) }, Aqua = { Background = Color3.fromRGB(20, 30, 48), Header = Color3.fromRGB(25, 40, 65), Tab = Color3.fromRGB(35, 55, 85), TabActive = Color3.fromRGB(0, 150, 255), Text = Color3.fromRGB(255, 255, 255), TextSecondary = Color3.fromRGB(180, 200, 220), ToggleOff = Color3.fromRGB(50, 70, 100), ToggleOn = Color3.fromRGB(0, 150, 255), Slider = Color3.fromRGB(0, 150, 255), Button = Color3.fromRGB(0, 150, 255), Shadow = Color3.fromRGB(0, 0, 0) }, Transparent = { Background = Color3.fromRGB(40, 30, 25), Header = Color3.fromRGB(60, 45, 35), Tab = Color3.fromRGB(80, 60, 45), TabActive = Color3.fromRGB(139, 90, 43), Text = Color3.fromRGB(255, 255, 255), TextSecondary = Color3.fromRGB(200, 180, 160), ToggleOff = Color3.fromRGB(100, 75, 55), ToggleOn = Color3.fromRGB(139, 90, 43), Slider = Color3.fromRGB(139, 90, 43), Button = Color3.fromRGB(139, 90, 43), Shadow = Color3.fromRGB(0, 0, 0) } } local currentTheme = Themes.Dark local themeNames = {"Dark", "Light", "Aqua", "Transparent"} local currentThemeIndex = 1 local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "ZombieDefenseHub" ScreenGui.ResetOnSpawn = false ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.Parent = game:GetService("CoreGui") local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, 400, 0, 500) MainFrame.Position = UDim2.new(0.5, -200, 0.5, -250) MainFrame.BackgroundColor3 = currentTheme.Background MainFrame.BorderSizePixel = 0 MainFrame.Parent = ScreenGui local MainCorner = Instance.new("UICorner") MainCorner.CornerRadius = UDim.new(0, 12) MainCorner.Parent = MainFrame local MainShadow = Instance.new("ImageLabel") MainShadow.Name = "Shadow" MainShadow.AnchorPoint = Vector2.new(0.5, 0.5) MainShadow.BackgroundTransparency = 1 MainShadow.Position = UDim2.new(0.5, 0, 0.5, 4) MainShadow.Size = UDim2.new(1, 24, 1, 24) MainShadow.ZIndex = -1 MainShadow.Image = "rbxassetid://1316045217" MainShadow.ImageColor3 = currentTheme.Shadow MainShadow.ImageTransparency = 0.6 MainShadow.ScaleType = Enum.ScaleType.Slice MainShadow.SliceCenter = Rect.new(10, 10, 118, 118) MainShadow.Parent = MainFrame local dragging = false local dragInput, dragStart, startPos MainFrame.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 end end) MainFrame.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) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) local Header = Instance.new("Frame") Header.Name = "Header" Header.Size = UDim2.new(1, 0, 0, 50) Header.BackgroundColor3 = currentTheme.Header Header.BorderSizePixel = 0 Header.Parent = MainFrame local HeaderCorner = Instance.new("UICorner") HeaderCorner.CornerRadius = UDim.new(0, 12) HeaderCorner.Parent = Header local HeaderBottom = Instance.new("Frame") HeaderBottom.Name = "HeaderBottom" HeaderBottom.Size = UDim2.new(1, 0, 0, 12) HeaderBottom.Position = UDim2.new(0, 0, 1, -12) HeaderBottom.BackgroundColor3 = currentTheme.Header HeaderBottom.BorderSizePixel = 0 HeaderBottom.Parent = Header local Title = Instance.new("TextLabel") Title.Name = "Title" Title.Size = UDim2.new(0, 250, 1, 0) Title.Position = UDim2.new(0, 15, 0, 0) Title.BackgroundTransparency = 1 Title.Text = "Zombie Defense Hub" Title.TextColor3 = currentTheme.Text Title.Font = Enum.Font.GothamBold Title.TextSize = 20 Title.TextXAlignment = Enum.TextXAlignment.Left Title.Parent = Header local VersionLabel = Instance.new("TextLabel") VersionLabel.Name = "Version" VersionLabel.Size = UDim2.new(0, 50, 0, 20) VersionLabel.Position = UDim2.new(0, 15, 0.5, 5) VersionLabel.BackgroundTransparency = 1 VersionLabel.Text = "v1.0" VersionLabel.TextColor3 = currentTheme.TextSecondary VersionLabel.Font = Enum.Font.Gotham VersionLabel.TextSize = 12 VersionLabel.TextXAlignment = Enum.TextXAlignment.Left VersionLabel.Parent = Header local ThemeButton = Instance.new("TextButton") ThemeButton.Name = "ThemeButton" ThemeButton.Size = UDim2.new(0, 36, 0, 36) ThemeButton.Position = UDim2.new(1, -46, 0.5, -18) ThemeButton.BackgroundColor3 = currentTheme.Tab ThemeButton.Text = "" ThemeButton.Parent = Header local ThemeButtonCorner = Instance.new("UICorner") ThemeButtonCorner.CornerRadius = UDim.new(0, 8) ThemeButtonCorner.Parent = ThemeButton local SunIcon = Instance.new("TextLabel") SunIcon.Name = "SunIcon" SunIcon.Size = UDim2.new(1, 0, 1, 0) SunIcon.BackgroundTransparency = 1 SunIcon.Text = "" SunIcon.TextColor3 = currentTheme.Text SunIcon.Font = Enum.Font.GothamBold SunIcon.TextSize = 20 SunIcon.Parent = ThemeButton local CloseButton = Instance.new("TextButton") CloseButton.Name = "CloseButton" CloseButton.Size = UDim2.new(0, 36, 0, 36) CloseButton.Position = UDim2.new(1, -88, 0.5, -18) CloseButton.BackgroundColor3 = Color3.fromRGB(220, 53, 69) CloseButton.Text = "" CloseButton.Parent = Header local CloseButtonCorner = Instance.new("UICorner") CloseButtonCorner.CornerRadius = UDim.new(0, 8) CloseButtonCorner.Parent = CloseButton local CloseIcon = Instance.new("TextLabel") CloseIcon.Name = "CloseIcon" CloseIcon.Size = UDim2.new(1, 0, 1, 0) CloseIcon.BackgroundTransparency = 1 CloseIcon.Text = "" CloseIcon.TextColor3 = Color3.fromRGB(255, 255, 255) CloseIcon.Font = Enum.Font.GothamBold CloseIcon.TextSize = 18 CloseIcon.Parent = CloseButton CloseButton.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) local TabContainer = Instance.new("Frame") TabContainer.Name = "TabContainer" TabContainer.Size = UDim2.new(1, -30, 0, 40) TabContainer.Position = UDim2.new(0, 15, 0, 60) TabContainer.BackgroundTransparency = 1 TabContainer.Parent = MainFrame local TabLayout = Instance.new("UIListLayout") TabLayout.FillDirection = Enum.FillDirection.Horizontal TabLayout.HorizontalAlignment = Enum.HorizontalAlignment.Left TabLayout.VerticalAlignment = Enum.VerticalAlignment.Center TabLayout.Padding = UDim.new(0, 10) TabLayout.Parent = TabContainer local ContentFrame = Instance.new("ScrollingFrame") ContentFrame.Name = "ContentFrame" ContentFrame.Size = UDim2.new(1, -30, 1, -115) ContentFrame.Position = UDim2.new(0, 15, 0, 110) ContentFrame.BackgroundTransparency = 1 ContentFrame.BorderSizePixel = 0 ContentFrame.ScrollBarThickness = 4 ContentFrame.ScrollBarImageColor3 = currentTheme.TabActive ContentFrame.CanvasSize = UDim2.new(0, 0, 0, 0) ContentFrame.Parent = MainFrame local ContentLayout = Instance.new("UIListLayout") ContentLayout.Padding = UDim.new(0, 10) ContentLayout.Parent = ContentFrame ContentLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() ContentFrame.CanvasSize = UDim2.new(0, 0, 0, ContentLayout.AbsoluteContentSize.Y + 20) end) local function UpdateTheme(themeName) currentTheme = Themes[themeName] ZombieDefenseHub.CurrentTheme = themeName MainFrame.BackgroundColor3 = currentTheme.Background Header.BackgroundColor3 = currentTheme.Header HeaderBottom.BackgroundColor3 = currentTheme.Header Title.TextColor3 = currentTheme.Text VersionLabel.TextColor3 = currentTheme.TextSecondary ThemeButton.BackgroundColor3 = currentTheme.Tab SunIcon.TextColor3 = currentTheme.Text ContentFrame.ScrollBarImageColor3 = currentTheme.TabActive for _, child in pairs(TabContainer:GetChildren()) do if child:IsA("TextButton") then if child:GetAttribute("Active") then child.BackgroundColor3 = currentTheme.TabActive else child.BackgroundColor3 = currentTheme.Tab end child.TextColor3 = currentTheme.Text end end for _, child in pairs(ContentFrame:GetChildren()) do if child:IsA("Frame") then for _, subChild in pairs(child:GetChildren()) do if subChild:IsA("TextLabel") then subChild.TextColor3 = currentTheme.Text elseif subChild:IsA("TextButton") then if subChild.Name == "ToggleButton" then local isOn = subChild:GetAttribute("State") subChild.BackgroundColor3 = isOn and currentTheme.ToggleOn or currentTheme.ToggleOff end elseif subChild:IsA("Frame") and subChild.Name == "SliderBar" then subChild.BackgroundColor3 = currentTheme.ToggleOff local fill = subChild:FindFirstChild("Fill") if fill then fill.BackgroundColor3 = currentTheme.Slider end end end end end end ThemeButton.MouseButton1Click:Connect(function() currentThemeIndex = currentThemeIndex % #themeNames + 1 UpdateTheme(themeNames[currentThemeIndex]) end) local function CreateToggle(name, callback) local ToggleFrame = Instance.new("Frame") ToggleFrame.Name = name.."Toggle" ToggleFrame.Size = UDim2.new(1, 0, 0, 50) ToggleFrame.BackgroundColor3 = currentTheme.Header ToggleFrame.BorderSizePixel = 0 ToggleFrame.Parent = ContentFrame local ToggleCorner = Instance.new("UICorner") ToggleCorner.CornerRadius = UDim.new(0, 8) ToggleCorner.Parent = ToggleFrame local ToggleLabel = Instance.new("TextLabel") ToggleLabel.Name = "Label" ToggleLabel.Size = UDim2.new(0, 200, 1, 0) ToggleLabel.Position = UDim2.new(0, 15, 0, 0) ToggleLabel.BackgroundTransparency = 1 ToggleLabel.Text = name ToggleLabel.TextColor3 = currentTheme.Text ToggleLabel.Font = Enum.Font.Gotham ToggleLabel.TextSize = 14 ToggleLabel.TextXAlignment = Enum.TextXAlignment.Left ToggleLabel.Parent = ToggleFrame local ToggleButton = Instance.new("TextButton") ToggleButton.Name = "ToggleButton" ToggleButton.Size = UDim2.new(0, 50, 0, 26) ToggleButton.Position = UDim2.new(1, -65, 0.5, -13) ToggleButton.BackgroundColor3 = currentTheme.ToggleOff ToggleButton.Text = "" ToggleButton:SetAttribute("State", false) ToggleButton.Parent = ToggleFrame local ToggleButtonCorner = Instance.new("UICorner") ToggleButtonCorner.CornerRadius = UDim.new(1, 0) ToggleButtonCorner.Parent = ToggleButton local ToggleCircle = Instance.new("Frame") ToggleCircle.Name = "Circle" ToggleCircle.Size = UDim2.new(0, 20, 0, 20) ToggleCircle.Position = UDim2.new(0, 3, 0.5, -10) ToggleCircle.BackgroundColor3 = Color3.fromRGB(255, 255, 255) ToggleCircle.BorderSizePixel = 0 ToggleCircle.Parent = ToggleButton local ToggleCircleCorner = Instance.new("UICorner") ToggleCircleCorner.CornerRadius = UDim.new(1, 0) ToggleCircleCorner.Parent = ToggleCircle local isOn = false ToggleButton.MouseButton1Click:Connect(function() isOn = not isOn ToggleButton:SetAttribute("State", isOn) ToggleButton.BackgroundColor3 = isOn and currentTheme.ToggleOn or currentTheme.ToggleOff TweenService:Create(ToggleCircle, TweenInfo.new(0.2), { Position = isOn and UDim2.new(0, 27, 0.5, -10) or UDim2.new(0, 3, 0.5, -10) }):Play() if callback then callback(isOn) end end) return ToggleFrame end local function CreateSlider(name, min, max, default, callback) local SliderFrame = Instance.new("Frame") SliderFrame.Name = name.."Slider" SliderFrame.Size = UDim2.new(1, 0, 0, 70) SliderFrame.BackgroundColor3 = currentTheme.Header SliderFrame.BorderSizePixel = 0 SliderFrame.Parent = ContentFrame local SliderCorner = Instance.new("UICorner") SliderCorner.CornerRadius = UDim.new(0, 8) SliderCorner.Parent = SliderFrame local SliderLabel = Instance.new("TextLabel") SliderLabel.Name = "Label" SliderLabel.Size = UDim2.new(0, 150, 0, 25) SliderLabel.Position = UDim2.new(0, 15, 0, 8) SliderLabel.BackgroundTransparency = 1 SliderLabel.Text = name SliderLabel.TextColor3 = currentTheme.Text SliderLabel.Font = Enum.Font.Gotham SliderLabel.TextSize = 14 SliderLabel.TextXAlignment = Enum.TextXAlignment.Left SliderLabel.Parent = SliderFrame local ValueLabel = Instance.new("TextLabel") ValueLabel.Name = "Value" ValueLabel.Size = UDim2.new(0, 60, 0, 25) ValueLabel.Position = UDim2.new(1, -75, 0, 8) ValueLabel.BackgroundTransparency = 1 ValueLabel.Text = tostring(default) ValueLabel.TextColor3 = currentTheme.TextSecondary ValueLabel.Font = Enum.Font.GothamBold ValueLabel.TextSize = 14 ValueLabel.TextXAlignment = Enum.TextXAlignment.Right ValueLabel.Parent = SliderFrame local SliderBar = Instance.new("Frame") SliderBar.Name = "SliderBar" SliderBar.Size = UDim2.new(1, -30, 0, 8) SliderBar.Position = UDim2.new(0, 15, 0, 45) SliderBar.BackgroundColor3 = currentTheme.ToggleOff SliderBar.BorderSizePixel = 0 SliderBar.Parent = SliderFrame local SliderBarCorner = Instance.new("UICorner") SliderBarCorner.CornerRadius = UDim.new(1, 0) SliderBarCorner.Parent = SliderBar local Fill = Instance.new("Frame") Fill.Name = "Fill" Fill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0) Fill.BackgroundColor3 = currentTheme.Slider Fill.BorderSizePixel = 0 Fill.Parent = SliderBar local FillCorner = Instance.new("UICorner") FillCorner.CornerRadius = UDim.new(1, 0) FillCorner.Parent = Fill local Knob = Instance.new("Frame") Knob.Name = "Knob" Knob.Size = UDim2.new(0, 16, 0, 16) Knob.Position = UDim2.new((default - min) / (max - min), -8, 0.5, -8) Knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255) Knob.BorderSizePixel = 0 Knob.Parent = SliderBar local KnobCorner = Instance.new("UICorner") KnobCorner.CornerRadius = UDim.new(1, 0) KnobCorner.Parent = Knob local draggingSlider = false local function UpdateSlider(input) local pos = math.clamp((input.Position.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X, 0, 1) local value = math.floor(min + (max - min) * pos) Fill.Size = UDim2.new(pos, 0, 1, 0) Knob.Position = UDim2.new(pos, -8, 0.5, -8) ValueLabel.Text = tostring(value) if callback then callback(value) end end SliderBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingSlider = true UpdateSlider(input) end end) UserInputService.InputChanged:Connect(function(input) if draggingSlider and input.UserInputType == Enum.UserInputType.MouseMovement then UpdateSlider(input) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then draggingSlider = false end end) return SliderFrame end local tabs = {} local currentTab = nil local function CreateTab(name) local TabButton = Instance.new("TextButton") TabButton.Name = name.."Tab" TabButton.Size = UDim2.new(0, 80, 1, 0) TabButton.BackgroundColor3 = currentTheme.Tab TabButton.Text = name TabButton.TextColor3 = currentTheme.Text TabButton.Font = Enum.Font.GothamBold TabButton.TextSize = 14 TabButton:SetAttribute("Active", false) TabButton.Parent = TabContainer local TabButtonCorner = Instance.new("UICorner") TabButtonCorner.CornerRadius = UDim.new(0, 8) TabButtonCorner.Parent = TabButton local TabContent = Instance.new("Frame") TabContent.Name = name.."Content" TabContent.Size = UDim2.new(1, 0, 1, 0) TabContent.BackgroundTransparency = 1 TabContent.Visible = false TabContent.Parent = ContentFrame local TabContentLayout = Instance.new("UIListLayout") TabContentLayout.Padding = UDim.new(0, 10) TabContentLayout.Parent = TabContent tabs[name] = { Button = TabButton, Content = TabContent } TabButton.MouseButton1Click:Connect(function() if currentTab then currentTab.Button:SetAttribute("Active", false) currentTab.Button.BackgroundColor3 = currentTheme.Tab currentTab.Content.Visible = false end TabButton:SetAttribute("Active", true) TabButton.BackgroundColor3 = currentTheme.TabActive TabContent.Visible = true currentTab = tabs[name] end) return TabContent end local MainTab = CreateTab("Main") local PlayerTab = CreateTab("Player") tabs["Main"].Button:SetAttribute("Active", true) tabs["Main"].Button.BackgroundColor3 = currentTheme.TabActive tabs["Main"].Content.Visible = true currentTab = tabs["Main"] local ESPSection = Instance.new("TextLabel") ESPSection.Name = "ESPSection" ESPSection.Size = UDim2.new(1, 0, 0, 25) ESPSection.BackgroundTransparency = 1 ESPSection.Text = " ESP FEATURES" ESPSection.TextColor3 = currentTheme.TextSecondary ESPSection.Font = Enum.Font.GothamBold ESPSection.TextSize = 12 ESPSection.TextXAlignment = Enum.TextXAlignment.Left ESPSection.Parent = MainTab local WeaponBoxToggle = CreateToggle("ESP Weapon Boxes", function(state) ESP_WeaponBoxes(state) end) WeaponBoxToggle.Parent = MainTab local BossesToggle = CreateToggle("ESP Bosses", function(state) ESP_Bosses(state) end) BossesToggle.Parent = MainTab local PumpkinToggle = CreateToggle("ESP Pumpkin", function(state) ESP_Pumpkin(state) end) PumpkinToggle.Parent = MainTab local SecretToggle = CreateToggle("ESP Secret", function(state) ESP_Secret(state) end) SecretToggle.Parent = MainTab local BatToggle = CreateToggle("ESP Bat", function(state) ESP_Bat(state) end) BatToggle.Parent = MainTab local ZombieToggle = CreateToggle("ESP Zombie", function(state) ESP_Zombie(state) end) ZombieToggle.Parent = MainTab local CombatSection = Instance.new("TextLabel") CombatSection.Name = "CombatSection" CombatSection.Size = UDim2.new(1, 0, 0, 25) CombatSection.BackgroundTransparency = 1 CombatSection.Text = " COMBAT" CombatSection.TextColor3 = currentTheme.TextSecondary CombatSection.Font = Enum.Font.GothamBold CombatSection.TextSize = 12 CombatSection.TextXAlignment = Enum.TextXAlignment.Left CombatSection.Parent = MainTab local AimAssistToggle = CreateToggle("Aim Assist", function(state) AimAssist(state) end) AimAssistToggle.Parent = MainTab local MovementSection = Instance.new("TextLabel") MovementSection.Name = "MovementSection" MovementSection.Size = UDim2.new(1, 0, 0, 25) MovementSection.BackgroundTransparency = 1 MovementSection.Text = " MOVEMENT" MovementSection.TextColor3 = currentTheme.TextSecondary MovementSection.Font = Enum.Font.GothamBold MovementSection.TextSize = 12 MovementSection.TextXAlignment = Enum.TextXAlignment.Left MovementSection.Parent = PlayerTab local NoclipToggle = CreateToggle("Noclip", function(state) Noclip(state) end) NoclipToggle.Parent = PlayerTab local WalkspeedSlider = CreateSlider("Walkspeed", 16, 100, 16, function(value) SetWalkspeed(value) end) WalkspeedSlider.Parent = PlayerTab local JumpPowerSlider = CreateSlider("JumpPower", 50, 150, 50, function(value) SetJumpPower(value) end) JumpPowerSlider.Parent = PlayerTab local InfiniteJumpToggle = CreateToggle("Infinite Jump", function(state) InfiniteJump(state) end) InfiniteJumpToggle.Parent = PlayerTab local VisualsSection = Instance.new("TextLabel") VisualsSection.Name = "VisualsSection" VisualsSection.Size = UDim2.new(1, 0, 0, 25) VisualsSection.BackgroundTransparency = 1 VisualsSection.Text = " VISUALS" VisualsSection.TextColor3 = currentTheme.TextSecondary VisualsSection.Font = Enum.Font.GothamBold VisualsSection.TextSize = 12 VisualsSection.TextXAlignment = Enum.TextXAlignment.Left VisualsSection.Parent = PlayerTab local XrayToggle = CreateToggle("Xray", function(state) Xray(state) end) XrayToggle.Parent = PlayerTab ZombieDefenseHub.GUI = ScreenGui return ZombieDefenseHub end local success, result = pcall(CreateGUI) if success then print("Zombie Defense Hub loaded successfully!") print("Version: " .. ZombieDefenseHub.Version) else warn("Failed to load Zombie Defense Hub: " .. tostring(result)) end return ZombieDefenseHub