-- MIGHT A BUG IN IT ! --// SERVICES local RunService = game:GetService("RunService") local Stats = game:GetService("Stats") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local CoreGui = game:GetService("CoreGui") --// REMOVE OLD pcall(function() CoreGui:FindFirstChild("FPSUnlockerHUD"):Destroy() end) --// GUI SETUP local Gui = Instance.new("ScreenGui") Gui.Name = "FPSUnlockerHUD" Gui.ResetOnSpawn = false Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling Gui.Parent = CoreGui --// HELPER: TWEEN local function tween(inst, info, props) local t = TweenService:Create(inst, info, props) t:Play() return t end -- Animation Styles local tFast = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) local tSmooth = TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out) local tBounce = TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out) local tIn = TweenInfo.new(0.2, Enum.EasingStyle.Back, Enum.EasingDirection.In) --// MAIN FRAME local Frame = Instance.new("Frame") Frame.Size = UDim2.fromOffset(240, 95) Frame.Position = UDim2.new(1, 50, 0, 40) Frame.BackgroundColor3 = Color3.fromRGB(15, 15, 20) Frame.BackgroundTransparency = 0.15 Frame.BorderSizePixel = 0 Frame.Active = true Frame.ClipsDescendants = true Frame.Parent = Gui local FrameScale = Instance.new("UIScale", Frame) Instance.new("UICorner", Frame).CornerRadius = UDim.new(0, 12) local MainStroke = Instance.new("UIStroke") MainStroke.Color = Color3.fromRGB(255, 255, 255) MainStroke.Transparency = 0.88 MainStroke.Thickness = 1 MainStroke.Parent = Frame -- Startup Slide-in Animation tween(Frame, tSmooth, {Position = UDim2.new(1, -260, 0, 40)}) --// HEADER / TITLE BAR local Header = Instance.new("Frame") Header.Size = UDim2.new(1, 0, 0, 32) Header.BackgroundTransparency = 1 Header.Parent = Frame -- Title (TextLabel: Draggable with frame, never triggers pop-up on click/drag) local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, -90, 1, 0) Title.Position = UDim2.fromOffset(12, 0) Title.BackgroundTransparency = 1 Title.Text = "FPS UNLOCKER" Title.Font = Enum.Font.GothamBold Title.TextSize = 11 Title.TextColor3 = Color3.fromRGB(160, 160, 175) Title.TextXAlignment = Enum.TextXAlignment.Left Title.Active = false Title.Parent = Header --// BUTTON CONTAINER local BtnContainer = Instance.new("Frame") BtnContainer.Size = UDim2.new(0, 80, 1, 0) BtnContainer.Position = UDim2.new(1, -84, 0, 0) BtnContainer.BackgroundTransparency = 1 BtnContainer.Parent = Header local Layout = Instance.new("UIListLayout") Layout.FillDirection = Enum.FillDirection.Horizontal Layout.HorizontalAlignment = Enum.HorizontalAlignment.Right Layout.VerticalAlignment = Enum.VerticalAlignment.Center Layout.Padding = UDim.new(0, 4) Layout.Parent = BtnContainer local function animateButton(btn, hoverColor) local scale = Instance.new("UIScale", btn) local defaultColor = btn.BackgroundColor3 local defaultText = btn.TextColor3 btn.MouseEnter:Connect(function() tween(scale, tFast, {Scale = 1.08}) if hoverColor then tween(btn, tFast, {BackgroundColor3 = hoverColor, TextColor3 = Color3.fromRGB(255, 255, 255)}) end end) btn.MouseLeave:Connect(function() tween(scale, tFast, {Scale = 1}) if hoverColor then tween(btn, tFast, {BackgroundColor3 = defaultColor, TextColor3 = defaultText}) end end) btn.MouseButton1Down:Connect(function() tween(scale, tFast, {Scale = 0.9}) end) btn.MouseButton1Up:Connect(function() tween(scale, tFast, {Scale = 1.08}) end) end local function createHeaderBtn(iconText, hoverColor) local btn = Instance.new("TextButton") btn.Size = UDim2.fromOffset(22, 22) btn.Text = iconText btn.Font = Enum.Font.GothamBold btn.TextSize = 12 btn.TextColor3 = Color3.fromRGB(200, 200, 210) btn.BackgroundColor3 = Color3.fromRGB(30, 30, 40) btn.BorderSizePixel = 0 btn.AutoButtonColor = false Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6) animateButton(btn, hoverColor) btn.Parent = BtnContainer return btn end local LockBtn = createHeaderBtn("🔓", Color3.fromRGB(255, 170, 0)) local MinBtn = createHeaderBtn("−", Color3.fromRGB(60, 60, 80)) local CloseBtn = createHeaderBtn("×", Color3.fromRGB(220, 50, 60)) --// STATS CONTAINER local StatsContainer = Instance.new("CanvasGroup") StatsContainer.Size = UDim2.new(1, -24, 0, 50) StatsContainer.Position = UDim2.fromOffset(12, 34) StatsContainer.BackgroundTransparency = 1 StatsContainer.BorderSizePixel = 0 StatsContainer.Parent = Frame local StatsLayout = Instance.new("UIListLayout") StatsLayout.SortOrder = Enum.SortOrder.LayoutOrder StatsLayout.Padding = UDim.new(0, 4) StatsLayout.Parent = StatsContainer local function createStatRow(labelName, order) local row = Instance.new("Frame") row.Size = UDim2.new(1, 0, 0, 18) row.BackgroundTransparency = 1 row.LayoutOrder = order local lbl = Instance.new("TextLabel") lbl.Size = UDim2.new(0, 50, 1, 0) lbl.BackgroundTransparency = 1 lbl.Text = labelName lbl.Font = Enum.Font.GothamBold lbl.TextSize = 12 lbl.TextColor3 = Color3.fromRGB(120, 120, 140) lbl.TextXAlignment = Enum.TextXAlignment.Left lbl.Parent = row local val = Instance.new("TextLabel") val.Size = UDim2.new(1, -50, 1, 0) val.Position = UDim2.fromOffset(50, 0) val.BackgroundTransparency = 1 val.Text = "..." val.Font = Enum.Font.GothamBold val.TextSize = 13 val.TextColor3 = Color3.fromRGB(255, 255, 255) val.TextXAlignment = Enum.TextXAlignment.Right val.Parent = row row.Parent = StatsContainer return val end local FPSLabel = createStatRow("FPS", 1) local PingLabel = createStatRow("PING", 2) --// CONFIRMATION BOX (MODAL) local ConfirmBox = Instance.new("Frame") ConfirmBox.Size = UDim2.fromOffset(240, 110) ConfirmBox.Position = UDim2.fromScale(0.5, 0.5) ConfirmBox.AnchorPoint = Vector2.new(0.5, 0.5) ConfirmBox.BackgroundColor3 = Color3.fromRGB(20, 20, 28) ConfirmBox.Visible = false ConfirmBox.Parent = Gui local ConfirmScale = Instance.new("UIScale", ConfirmBox) ConfirmScale.Scale = 0 Instance.new("UICorner", ConfirmBox).CornerRadius = UDim.new(0, 12) local ConfirmStroke = Instance.new("UIStroke") ConfirmStroke.Color = Color3.fromRGB(255, 170, 0) ConfirmStroke.Transparency = 0.5 ConfirmStroke.Thickness = 1 ConfirmStroke.Parent = ConfirmBox local ConfirmText = Instance.new("TextLabel") ConfirmText.Size = UDim2.new(1, -20, 0, 50) ConfirmText.Position = UDim2.fromOffset(10, 10) ConfirmText.BackgroundTransparency = 1 ConfirmText.TextWrapped = true ConfirmText.Text = "Lock HUD position in place?" ConfirmText.Font = Enum.Font.GothamBold ConfirmText.TextSize = 13 ConfirmText.TextColor3 = Color3.fromRGB(230, 230, 240) ConfirmText.TextXAlignment = Enum.TextXAlignment.Center ConfirmText.Parent = ConfirmBox local function makeModalBtn(text, pos, bgCol) local b = Instance.new("TextButton") b.Size = UDim2.fromOffset(85, 28) b.Position = pos b.Text = text b.Font = Enum.Font.GothamBold b.TextSize = 12 b.TextColor3 = Color3.fromRGB(255, 255, 255) b.BackgroundColor3 = bgCol b.BorderSizePixel = 0 b.AutoButtonColor = false Instance.new("UICorner", b).CornerRadius = UDim.new(0, 6) animateButton(b, nil) b.Parent = ConfirmBox return b end local YesBtn = makeModalBtn("Lock", UDim2.new(0.5, -90, 1, -38), Color3.fromRGB(220, 130, 0)) local NoBtn = makeModalBtn("Cancel", UDim2.new(0.5, 5, 1, -38), Color3.fromRGB(45, 45, 55)) --// MODAL ANIMATION FUNCTIONS local function showConfirm() ConfirmBox.Visible = true tween(ConfirmScale, tBounce, {Scale = 1}) end local function hideConfirm() local t = tween(ConfirmScale, tIn, {Scale = 0}) t.Completed:Connect(function() ConfirmBox.Visible = false end) end --// STATE local locked = false local dragging = false local dragStart, startPos local minimized = false --// LOCK / UNLOCK LOGIC local function setLocked(state) locked = state LockBtn.Text = locked and "🔒" or "🔓" tween(MainStroke, tFast, { Color = locked and Color3.fromRGB(255, 170, 0) or Color3.fromRGB(255, 255, 255), Transparency = locked and 0.4 or 0.88 }) end -- Lock Button ONLY toggles modal or unlocks directly LockBtn.MouseButton1Click:Connect(function() if not locked then showConfirm() else setLocked(false) end end) YesBtn.MouseButton1Click:Connect(function() setLocked(true) hideConfirm() end) NoBtn.MouseButton1Click:Connect(function() hideConfirm() end) --// DRAGGING LOGIC (Draggable via title/frame, no pop-up on drag or click) Frame.InputBegan:Connect(function(input) if locked then return end if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = Frame.Position tween(Frame, tFast, {Rotation = 1.5}) end end) Frame.InputEnded:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then dragging = false tween(Frame, tFast, {Rotation = 0}) end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart Frame.Position = startPos + UDim2.fromOffset(delta.X, delta.Y) end end) --// MINIMIZE MinBtn.MouseButton1Click:Connect(function() minimized = not minimized MinBtn.Text = minimized and "+" or "−" if minimized then tween(StatsContainer, tFast, {GroupTransparency = 1}) tween(Frame, tBounce, {Size = UDim2.fromOffset(240, 32)}) else tween(Frame, tBounce, {Size = UDim2.fromOffset(240, 95)}) task.delay(0.1, function() tween(StatsContainer, tFast, {GroupTransparency = 0}) end) end end) --// CLOSE CloseBtn.MouseButton1Click:Connect(function() local t = tween(FrameScale, tIn, {Scale = 0}) t.Completed:Connect(function() Gui:Destroy() end) end) --// REAL-TIME STATS UPDATER local frameTimes = {} RunService.RenderStepped:Connect(function() local now = os.clock() table.insert(frameTimes, now) while frameTimes[1] and (now - frameTimes[1]) > 1 do table.remove(frameTimes, 1) end local currentFps = #frameTimes local ping = tonumber(Stats.Network.ServerStatsItem["Data Ping"]:GetValueString():match("%d+")) or 0 FPSLabel.Text = currentFps .. " FPS" PingLabel.Text = ping .. " ms" FPSLabel.TextColor3 = currentFps >= 60 and Color3.fromRGB(0, 235, 160) or currentFps >= 30 and Color3.fromRGB(255, 170, 0) or Color3.fromRGB(255, 75, 75) PingLabel.TextColor3 = ping <= 50 and Color3.fromRGB(0, 235, 160) or ping <= 100 and Color3.fromRGB(255, 170, 0) or Color3.fromRGB(255, 75, 75) end)