-- Global variables _G.HeadSize = 5 _G.HeadTransparency = 0 -- Default transparency _G.Disabled = true _G.UIVisible = true -- Keeps track of UI visibility -- Create UI local player = game:GetService("Players").LocalPlayer local coreGui = game:GetService("CoreGui") local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "HeadCustomizationUI" ScreenGui.Parent = coreGui -- Parent to CoreGui instead of PlayerGui ScreenGui.IgnoreGuiInset = true local Frame = Instance.new("Frame") Frame.Size = UDim2.new(0, 300, 0, 300) Frame.Position = UDim2.new(0.5, -150, 0.5, -150) Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) Frame.BackgroundTransparency = 0.5 Frame.Parent = ScreenGui Frame.BorderSizePixel = 2 Frame.BorderColor3 = Color3.fromRGB(0, 128, 255) Frame.ClipsDescendants = true Frame.ZIndex = 2 local TopBar = Instance.new("Frame") TopBar.Size = UDim2.new(1, 0, 0, 30) TopBar.BackgroundColor3 = Color3.fromRGB(0, 128, 255) TopBar.Parent = Frame TopBar.BorderSizePixel = 0 -- Draggable functionality local dragging, dragInput, dragStart, startPos local function onInputBegan(input, gameProcessed) if input.UserInputType == Enum.UserInputType.MouseButton1 and not gameProcessed then dragging = true dragStart = input.Position startPos = Frame.Position input.Changed:Connect(function() if dragging then local delta = input.Position - dragStart Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) end end local function onInputEnded(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end TopBar.InputBegan:Connect(onInputBegan) TopBar.InputEnded:Connect(onInputEnded) -- Close Button local CloseButton = Instance.new("TextButton") CloseButton.Text = "X" CloseButton.Size = UDim2.new(0, 30, 0, 30) CloseButton.Position = UDim2.new(1, -30, 0, 0) CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255) CloseButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) CloseButton.BorderSizePixel = 0 CloseButton.Parent = TopBar CloseButton.MouseButton1Click:Connect(function() _G.UIVisible = false ScreenGui.Enabled = false print("UI has been hidden.") end) -- Head Size Label local HeadSizeLabel = Instance.new("TextLabel") HeadSizeLabel.Text = "Head Size:" HeadSizeLabel.Size = UDim2.new(0, 280, 0, 30) HeadSizeLabel.Position = UDim2.new(0, 10, 0, 40) HeadSizeLabel.TextColor3 = Color3.fromRGB(255, 255, 255) HeadSizeLabel.BackgroundTransparency = 1 HeadSizeLabel.Parent = Frame -- Input box for Head Size local HeadSizeInput = Instance.new("TextBox") HeadSizeInput.Text = tostring(_G.HeadSize) HeadSizeInput.Size = UDim2.new(0, 280, 0, 30) HeadSizeInput.Position = UDim2.new(0, 10, 0, 70) HeadSizeInput.BackgroundColor3 = Color3.fromRGB(255, 255, 255) HeadSizeInput.TextColor3 = Color3.fromRGB(0, 0, 0) HeadSizeInput.ClearTextOnFocus = true HeadSizeInput.Parent = Frame -- Label for Transparency local TransparencyLabel = Instance.new("TextLabel") TransparencyLabel.Text = "Transparency:" TransparencyLabel.Size = UDim2.new(0, 280, 0, 30) TransparencyLabel.Position = UDim2.new(0, 10, 0, 110) TransparencyLabel.TextColor3 = Color3.fromRGB(255, 255, 255) TransparencyLabel.BackgroundTransparency = 1 TransparencyLabel.Parent = Frame -- Input box for Transparency local TransparencyInput = Instance.new("TextBox") TransparencyInput.Text = tostring(_G.HeadTransparency) TransparencyInput.Size = UDim2.new(0, 280, 0, 30) TransparencyInput.Position = UDim2.new(0, 10, 0, 140) TransparencyInput.BackgroundColor3 = Color3.fromRGB(255, 255, 255) TransparencyInput.TextColor3 = Color3.fromRGB(0, 0, 0) TransparencyInput.ClearTextOnFocus = true TransparencyInput.Parent = Frame -- Toggle Button to Enable/Disable Effect local ToggleButton = Instance.new("TextButton") ToggleButton.Text = "Enable Effect" ToggleButton.Size = UDim2.new(0, 280, 0, 30) ToggleButton.Position = UDim2.new(0, 10, 0, 200) ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 128, 255) ToggleButton.BorderSizePixel = 0 ToggleButton.Parent = Frame ToggleButton.MouseButton1Click:Connect(function() _G.Disabled = not _G.Disabled ToggleButton.Text = _G.Disabled and "Enable Effect" or "Disable Effect" end) -- Update the values when the input changes HeadSizeInput.FocusLost:Connect(function() local newSize = tonumber(HeadSizeInput.Text) if newSize then _G.HeadSize = newSize else HeadSizeInput.Text = tostring(_G.HeadSize) -- Reset to current value if invalid end end) TransparencyInput.FocusLost:Connect(function() local newTransparency = tonumber(TransparencyInput.Text) if newTransparency then _G.HeadTransparency = math.clamp(newTransparency, 0, 1) -- Clamp to the 0 to 1 range else TransparencyInput.Text = tostring(_G.HeadTransparency) -- Reset to current value if invalid end end) -- Show a message on the UI toggle local function showToggleMessage() local MessageLabel = Instance.new("TextLabel") MessageLabel.Text = "Press 'Right Shift' to toggle the UI." MessageLabel.Size = UDim2.new(0, 280, 0, 30) MessageLabel.Position = UDim2.new(0, 10, 0, 240) MessageLabel.TextColor3 = Color3.fromRGB(255, 255, 255) MessageLabel.BackgroundTransparency = 1 MessageLabel.Parent = Frame end showToggleMessage() -- Keybind to toggle UI visibility (Right Shift) game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.RightShift then _G.UIVisible = not _G.UIVisible ScreenGui.Enabled = _G.UIVisible print(_G.UIVisible and "UI shown." or "UI hidden.") end end) -- Update heads of the AI dummies and noobs in workspace game:GetService('RunService').RenderStepped:connect(function() if not _G.Disabled then return end -- Iterate through 'Dummies' and 'Noobs' folders in workspace for _, folderName in pairs({"Dummies", "Noobs"}) do local folder = workspace.AI:FindFirstChild(folderName) if folder then for _, v in pairs(folder:GetChildren()) do if v:FindFirstChild("Head") then pcall(function() -- Update head size and appearance v.Head.Size = Vector3.new(_G.HeadSize, _G.HeadSize, _G.HeadSize) v.Head.Transparency = _G.HeadTransparency -- Apply specific color based on the folder (Dummy or Noob) if folderName == "Dummies" then v.Head.BrickColor = BrickColor.new("Dark stone grey") -- Gray color for Dummies elseif folderName == "Noobs" then v.Head.BrickColor = BrickColor.new("Bright yellow") -- Yellow color for Noobs end v.Head.Material = "Neon" v.Head.CanCollide = false v.Head.Anchored = false -- Unanchor the head v.Head.Massless = true -- Make the head massless end) end end end end end)