-- [[ Critical Future - Lua UI ]] -- [[ Made By KashanIsNotMe ]] local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") -- Prevent duplicate instances if game:GetService("CoreGui"):FindFirstChild("CriticalFutureUI") then game:GetService("CoreGui"):FindFirstChild("CriticalFutureUI"):Destroy() end local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "CriticalFutureUI" ScreenGui.Parent = game:GetService("CoreGui") ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling -- Main Frame (Small, Clean, Futuristic) local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Parent = ScreenGui MainFrame.BackgroundColor3 = Color3.fromRGB(18, 18, 24) MainFrame.BorderColor3 = Color3.fromRGB(120, 80, 220) MainFrame.BorderSizePixel = 1 MainFrame.Position = UDim2.new(0.5, -225, 0.5, -140) MainFrame.Size = UDim2.new(0, 450, 0, 280) MainFrame.Active = true MainFrame.Draggable = false -- Custom smooth drag with delay applied below local MainCorner = Instance.new("UICorner") MainCorner.CornerRadius = UDim.new(0, 8) MainCorner.Parent = MainFrame -- Top Bar / Header local TopBar = Instance.new("Frame") TopBar.Name = "TopBar" TopBar.Parent = MainFrame TopBar.BackgroundColor3 = Color3.fromRGB(24, 24, 32) TopBar.BorderSizePixel = 0 TopBar.Size = UDim2.new(1, 0, 0, 32) local TopCorner = Instance.new("UICorner") TopCorner.CornerRadius = UDim.new(0, 8) TopCorner.Parent = TopBar local TitleLabel = Instance.new("TextLabel") TitleLabel.Parent = TopBar TitleLabel.BackgroundTransparency = 1 TitleLabel.Position = UDim2.new(0, 12, 0, 0) TitleLabel.Size = UDim2.new(0, 200, 1, 0) TitleLabel.Font = Enum.Font.GothamBold TitleLabel.Text = "Critical Future" TitleLabel.TextColor3 = Color3.fromRGB(230, 230, 250) TitleLabel.TextSize = 14 TitleLabel.TextXAlignment = Enum.TextXAlignment.Left -- Smooth Draggable Logic with Delay / Inertia Effect local dragging, dragInput, dragStart, startPos local lerpSpeed = 0.12 local targetPos = MainFrame.Position TopBar.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 input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UserInputService.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) RunService.RenderStepped:Connect(function() if dragging and dragInput then local delta = dragInput.Position - dragStart targetPos = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end -- Smooth Lerp Interpolation for Drag Delay / Fluid Motion MainFrame.Position = UDim2.new( MainFrame.Position.X.Scale, MainFrame.Position.X.Offset + (targetPos.X.Offset - MainFrame.Position.X.Offset) * lerpSpeed, MainFrame.Position.Y.Scale, MainFrame.Position.Y.Offset + (targetPos.Y.Offset - MainFrame.Position.Y.Offset) * lerpSpeed ) end) -- Left Tab List Frame local TabList = Instance.new("ScrollingFrame") TabList.Name = "TabList" TabList.Parent = MainFrame TabList.Active = true TabList.BackgroundColor3 = Color3.fromRGB(22, 22, 30) TabList.BorderSizePixel = 0 TabList.Position = UDim2.new(0, 0, 0, 32) TabList.Size = UDim2.new(0, 115, 1, -32) TabList.CanvasSize = UDim2.new(0, 0, 0, 0) TabList.ScrollBarThickness = 2 local TabListLayout = Instance.new("UIListLayout") TabListLayout.Parent = TabList TabListLayout.SortOrder = Enum.SortOrder.LayoutOrder TabListLayout.Padding = UDim.new(0, 4) -- Container for Tab Contents local ContainerHolder = Instance.new("Folder") ContainerHolder.Name = "ContainerHolder" ContainerHolder.Parent = MainFrame local tabs = {} local contents = {} local activeTab = nil local function CreateTab(name) local tabBtn = Instance.new("TextButton") tabBtn.Name = name .. "Tab" tabBtn.Parent = TabList tabBtn.BackgroundColor3 = Color3.fromRGB(30, 30, 42) tabBtn.BackgroundTransparency = 1 tabBtn.Size = UDim2.new(1, 0, 0, 32) tabBtn.Font = Enum.Font.GothamSemibold tabBtn.TextColor3 = Color3.fromRGB(160, 160, 180) tabBtn.TextSize = 12 tabBtn.Text = " " .. name tabBtn.TextXAlignment = Enum.TextXAlignment.Left local content = Instance.new("ScrollingFrame") content.Name = name .. "Content" content.Parent = ContainerHolder content.Active = true content.BackgroundColor3 = Color3.fromRGB(18, 18, 24) content.BackgroundTransparency = 1 content.BorderSizePixel = 0 content.Position = UDim2.new(0, 120, 0, 38) content.Size = UDim2.new(1, -125, 1, -44) content.CanvasSize = UDim2.new(0, 0, 0, 0) content.ScrollBarThickness = 3 content.Visible = false local layout = Instance.new("UIListLayout") layout.Parent = content layout.SortOrder = Enum.SortOrder.LayoutOrder layout.Padding = UDim.new(0, 6) layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() content.CanvasSize = UDim2.new(0, 0, 0, layout.AbsoluteContentSize.Y + 10) end) tabBtn.MouseButton1Click:Connect(function() for _, t in pairs(contents) do t.Visible = false end for _, b in pairs(tabs) do b.TextColor3 = Color3.fromRGB(160, 160, 180) b.BackgroundTransparency = 1 end content.Visible = true tabBtn.TextColor3 = Color3.fromRGB(230, 230, 250) tabBtn.BackgroundTransparency = 0.5 end) if not activeTab then activeTab = name content.Visible = true tabBtn.TextColor3 = Color3.fromRGB(230, 230, 250) tabBtn.BackgroundTransparency = 0.5 end tabs[name] = tabBtn contents[name] = content return content end -- UI Component Helpers local function AddButton(tabContent, text, callback) local btn = Instance.new("TextButton") btn.Parent = tabContent btn.BackgroundColor3 = Color3.fromRGB(26, 26, 36) btn.Size = UDim2.new(1, -6, 0, 28) btn.Font = Enum.Font.Gotham btn.TextColor3 = Color3.fromRGB(210, 210, 230) btn.TextSize = 11 btn.Text = text local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 4) corner.Parent = btn btn.MouseButton1Click:Connect(function() pcall(callback) end) end local function AddToggle(tabContent, text, callback) local toggled = false local btn = Instance.new("TextButton") btn.Parent = tabContent btn.BackgroundColor3 = Color3.fromRGB(26, 26, 36) btn.Size = UDim2.new(1, -6, 0, 28) btn.Font = Enum.Font.Gotham btn.TextColor3 = Color3.fromRGB(210, 210, 230) btn.TextSize = 11 btn.Text = text .. " [OFF]" local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 4) corner.Parent = btn btn.MouseButton1Click:Connect(function() toggled = not toggled btn.Text = text .. (toggled and " [ON]" or " [OFF]") btn.TextColor3 = toggled and Color3.fromRGB(120, 220, 120) or Color3.fromRGB(210, 210, 230) pcall(function() callback(toggled) end) end) end local function AddTextBox(tabContent, placeholder, callback) local box = Instance.new("TextBox") box.Parent = tabContent box.BackgroundColor3 = Color3.fromRGB(26, 26, 36) box.Size = UDim2.new(1, -6, 0, 28) box.Font = Enum.Font.Gotham box.PlaceholderText = placeholder box.Text = "" box.TextColor3 = Color3.fromRGB(230, 230, 250) box.PlaceholderColor3 = Color3.fromRGB(120, 120, 140) box.TextSize = 11 local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 4) corner.Parent = box box.FocusLost:Connect(function(enterPressed) if enterPressed then pcall(function() callback(box.Text) end) end end) end -- ==================== TAB 1: MAIN ==================== local MainTab = CreateTab("Main") AddButton(MainTab, "GoTo Lobby", function() if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-264, 194, 316) end end) AddButton(MainTab, "GoTo Map", function() if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-105, 47, 7) end end) AddTextBox(MainTab, "Set Speed...", function(val) local num = tonumber(val) if num and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then LocalPlayer.Character.Humanoid.WalkSpeed = num end end) AddTextBox(MainTab, "Set Jump Power...", function(val) local num = tonumber(val) if num and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then LocalPlayer.Character.Humanoid.JumpPower = num end end) AddToggle(MainTab, "Fly", function(state) -- Simple fly toggle placeholder print("Fly:", state) end) AddToggle(MainTab, "Infinite Jump", function(state) _G.InfJump = state UserInputService.JumpRequest:Connect(function() if _G.InfJump and LocalPlayer.Character and LocalPlayer.Character:FindFirstChildOfClass("Humanoid") then LocalPlayer.Character.Character:FindFirstChildOfClass("Humanoid"):ChangeState(Enum.HumanoidStateType.Jumping) end end) end) AddToggle(MainTab, "Undamaged Fall", function(state) print("Undamaged Fall:", state) end) AddToggle(MainTab, "Invisible FE", function(state) print("Invisible FE:", state) end) -- ==================== TAB 2: TROLL ==================== local TrollTab = CreateTab("Troll") AddTextBox(TrollTab, "Tap To Select Player...", function(val) print("Selected Player Target:", val) end) AddButton(TrollTab, "Fling Target", function() print("Flinging target...") end) AddToggle(TrollTab, "Bang", function(state) print("Bang Toggle:", state) end) AddTextBox(TrollTab, "Bang Speed...", function(val) print("Bang speed set:", val) end) -- ==================== TAB 3: PROTECTION ==================== local ProtTab = CreateTab("Protection") AddToggle(ProtTab, "Anti-Fling", function(state) print("Anti-Fling:", state) end) AddToggle(ProtTab, "Anti-Kick (Instant Server Hop)", function(state) print("Anti-Kick:", state) end) AddToggle(ProtTab, "Anti-Ban (Instant Server Hop)", function(state) print("Anti-Ban:", state) end) AddToggle(ProtTab, "Anti-Void", function(state) print("Anti-Void:", state) end) AddToggle(ProtTab, "Anti-Detect (Instant Server Hop)", function(state) print("Anti-Detect:", state) end) AddToggle(ProtTab, "Anti-AFK Anti-Sit", function(state) print("Anti-AFK Anti-Sit:", state) end) -- ==================== TAB 4: SETTINGS ==================== local SettingsTab = CreateTab("Settings") -- Config Features AddTextBox(SettingsTab, "Config Name...", function(val) _G.ConfigName = val end) AddButton(SettingsTab, "Save Config", function() print("Config Saved:", _G.ConfigName) end) AddButton(SettingsTab, "Load Config", function() print("Config Loaded:", _G.ConfigName) end) AddButton(SettingsTab, "Delete Config", function() print("Config Deleted:", _G.ConfigName) end) -- Theme Switcher AddButton(SettingsTab, "Theme: Emerald", function() MainFrame.BorderColor3 = Color3.fromRGB(40, 200, 120) end) AddButton(SettingsTab, "Theme: Coffee", function() MainFrame.BorderColor3 = Color3.fromRGB(150, 100, 60) end) AddButton(SettingsTab, "Theme: Rainbow", function() MainFrame.BorderColor3 = Color3.fromRGB(255, 100, 200) end) AddButton(SettingsTab, "Theme: Amethyst", function() MainFrame.BorderColor3 = Color3.fromRGB(140, 60, 220) end) AddButton(SettingsTab, "Theme: Golden Brown", function() MainFrame.BorderColor3 = Color3.fromRGB(218, 165, 32) end) -- Background Transparency & Destroy UI AddTextBox(SettingsTab, "Background Transparency (0 to 1)", function(val) local num = tonumber(val) if num then MainFrame.BackgroundTransparency = num end end) AddButton(SettingsTab, "Destroy UI", function() ScreenGui:Destroy() end) -- ==================== TAB 5: CREDITS ==================== local CreditsTab = CreateTab("Credits") AddButton(CreditsTab, "Made By KashanIsNotMe", function() print("Critical Future UI | Developed by KashanIsNotMe") end)