--[[ Minimal Fly Widget Чисто, удобно, без лишнего ]] local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera -- Настройки local Speed = 50 local Flying = false local BodyVel, BodyGyro local Conn local Vertical = 0 -- -1 down, 0, +1 up local Keys = {W=false, A=false, S=false, D=false, Space=false, Ctrl=false} -- GUI Parent local function getGuiParent() if gethui then local ok, h = pcall(gethui) if ok and h then return h end end return game:GetService("CoreGui") end local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "MinimalFly" ScreenGui.ResetOnSpawn = false ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.Parent = getGuiParent() -- Основной виджет local Widget = Instance.new("Frame") Widget.Name = "Widget" Widget.Size = UDim2.fromOffset(180, 210) Widget.Position = UDim2.new(0.02, 0, 0.35, 0) Widget.BackgroundColor3 = Color3.fromRGB(18, 18, 24) Widget.BorderSizePixel = 0 Widget.Active = true Widget.Draggable = true Widget.Parent = ScreenGui local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 12) UICorner.Parent = Widget local Stroke = Instance.new("UIStroke") Stroke.Color = Color3.fromRGB(50, 50, 65) Stroke.Thickness = 1 Stroke.Parent = Widget -- Заголовок local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, -36, 0, 32) Title.Position = UDim2.fromOffset(12, 6) Title.BackgroundTransparency = 1 Title.Text = "FLY" Title.TextColor3 = Color3.fromRGB(230, 230, 245) Title.TextSize = 16 Title.Font = Enum.Font.GothamBold Title.TextXAlignment = Enum.TextXAlignment.Left Title.Parent = Widget -- Кнопка закрыть local CloseBtn = Instance.new("TextButton") CloseBtn.Size = UDim2.fromOffset(26, 26) CloseBtn.Position = UDim2.new(1, -32, 0, 6) CloseBtn.BackgroundColor3 = Color3.fromRGB(35, 35, 45) CloseBtn.Text = "×" CloseBtn.TextColor3 = Color3.fromRGB(200, 200, 210) CloseBtn.TextSize = 18 CloseBtn.Font = Enum.Font.GothamBold CloseBtn.Parent = Widget local CloseCorner = Instance.new("UICorner") CloseCorner.CornerRadius = UDim.new(0, 8) CloseCorner.Parent = CloseBtn CloseBtn.MouseButton1Click:Connect(function() ScreenGui:Destroy() if Flying then stopFly() end end) -- Скорость local SpeedLabel = Instance.new("TextLabel") SpeedLabel.Size = UDim2.new(1, -24, 0, 18) SpeedLabel.Position = UDim2.fromOffset(12, 42) SpeedLabel.BackgroundTransparency = 1 SpeedLabel.Text = "Speed" SpeedLabel.TextColor3 = Color3.fromRGB(140, 140, 160) SpeedLabel.TextSize = 12 SpeedLabel.Font = Enum.Font.Gotham SpeedLabel.TextXAlignment = Enum.TextXAlignment.Left SpeedLabel.Parent = Widget local SpeedBox = Instance.new("TextBox") SpeedBox.Size = UDim2.new(1, -90, 0, 28) SpeedBox.Position = UDim2.fromOffset(12, 62) SpeedBox.BackgroundColor3 = Color3.fromRGB(28, 28, 38) SpeedBox.Text = tostring(Speed) SpeedBox.TextColor3 = Color3.fromRGB(230, 230, 245) SpeedBox.TextSize = 14 SpeedBox.Font = Enum.Font.GothamMedium SpeedBox.ClearTextOnFocus = false SpeedBox.Parent = Widget local SpeedCorner = Instance.new("UICorner") SpeedCorner.CornerRadius = UDim.new(0, 8) SpeedCorner.Parent = SpeedBox local function updateSpeed(val) Speed = math.clamp(tonumber(val) or Speed, 1, 1000) SpeedBox.Text = tostring(math.floor(Speed)) end SpeedBox.FocusLost:Connect(function() updateSpeed(SpeedBox.Text) end) -- Кнопки + / - local function makeSmallBtn(text, pos) local btn = Instance.new("TextButton") btn.Size = UDim2.fromOffset(32, 28) btn.Position = pos btn.BackgroundColor3 = Color3.fromRGB(40, 40, 55) btn.Text = text btn.TextColor3 = Color3.fromRGB(230, 230, 245) btn.TextSize = 16 btn.Font = Enum.Font.GothamBold btn.Parent = Widget local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, 8) c.Parent = btn return btn end local MinusBtn = makeSmallBtn("−", UDim2.new(1, -76, 0, 62)) local PlusBtn = makeSmallBtn("+", UDim2.new(1, -40, 0, 62)) MinusBtn.MouseButton1Click:Connect(function() updateSpeed(Speed - 5) end) PlusBtn.MouseButton1Click:Connect(function() updateSpeed(Speed + 5) end) -- Кнопки UP / DOWN local function makeActionBtn(text, pos, color) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0.5, -16, 0, 34) btn.Position = pos btn.BackgroundColor3 = color or Color3.fromRGB(40, 40, 55) btn.Text = text btn.TextColor3 = Color3.fromRGB(240, 240, 250) btn.TextSize = 13 btn.Font = Enum.Font.GothamBold btn.Parent = Widget local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, 8) c.Parent = btn return btn end local UpBtn = makeActionBtn("UP", UDim2.fromOffset(12, 102), Color3.fromRGB(45, 55, 80)) local DownBtn = makeActionBtn("DOWN", UDim2.new(0.5, 4, 0, 102), Color3.fromRGB(45, 55, 80)) UpBtn.MouseButton1Down:Connect(function() Vertical = 1 end) UpBtn.MouseButton1Up:Connect(function() Vertical = 0 end) UpBtn.MouseLeave:Connect(function() Vertical = 0 end) DownBtn.MouseButton1Down:Connect(function() Vertical = -1 end) DownBtn.MouseButton1Up:Connect(function() Vertical = 0 end) DownBtn.MouseLeave:Connect(function() Vertical = 0 end) -- Главная кнопка FLY local FlyBtn = Instance.new("TextButton") FlyBtn.Size = UDim2.new(1, -24, 0, 42) FlyBtn.Position = UDim2.fromOffset(12, 148) FlyBtn.BackgroundColor3 = Color3.fromRGB(70, 90, 220) FlyBtn.Text = "FLY" FlyBtn.TextColor3 = Color3.fromRGB(255, 255, 255) FlyBtn.TextSize = 16 FlyBtn.Font = Enum.Font.GothamBold FlyBtn.Parent = Widget local FlyCorner = Instance.new("UICorner") FlyCorner.CornerRadius = UDim.new(0, 10) FlyCorner.Parent = FlyBtn local function setFlyVisual(state) if state then FlyBtn.Text = "STOP" FlyBtn.BackgroundColor3 = Color3.fromRGB(200, 60, 80) else FlyBtn.Text = "FLY" FlyBtn.BackgroundColor3 = Color3.fromRGB(70, 90, 220) end end -- ===== Логика полёта ===== local function getRoot() local char = LocalPlayer.Character if not char then return end return char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso") end local function stopFly() Flying = false setFlyVisual(false) if Conn then Conn:Disconnect() Conn = nil end if BodyVel then BodyVel:Destroy() BodyVel = nil end if BodyGyro then BodyGyro:Destroy() BodyGyro = nil end local hum = LocalPlayer.Character and LocalPlayer.Character:FindFirstChildOfClass("Humanoid") if hum then hum.PlatformStand = false end end local function startFly() local root = getRoot() local hum = LocalPlayer.Character and LocalPlayer.Character:FindFirstChildOfClass("Humanoid") if not root or not hum then return end Flying = true setFlyVisual(true) BodyVel = Instance.new("BodyVelocity") BodyVel.MaxForce = Vector3.new(9e9, 9e9, 9e9) BodyVel.Velocity = Vector3.zero BodyVel.Parent = root BodyGyro = Instance.new("BodyGyro") BodyGyro.MaxTorque = Vector3.new(9e9, 9e9, 9e9) BodyGyro.P = 9e4 BodyGyro.Parent = root hum.PlatformStand = true Conn = RunService.RenderStepped:Connect(function() if not Flying or not root or not root.Parent then stopFly() return end local camCF = Camera.CFrame local move = Vector3.zero if Keys.W then move = move + camCF.LookVector end if Keys.S then move = move - camCF.LookVector end if Keys.A then move = move - camCF.RightVector end if Keys.D then move = move + camCF.RightVector end -- вертикаль от кнопок + клавиш local up = Vertical if Keys.Space then up = up + 1 end if Keys.Ctrl then up = up - 1 end if move.Magnitude > 0 then move = move.Unit * Speed end move = move + Vector3.new(0, up * Speed, 0) BodyVel.Velocity = move BodyGyro.CFrame = camCF end) end local function toggleFly() if Flying then stopFly() else startFly() end end FlyBtn.MouseButton1Click:Connect(toggleFly) -- Клавиши UserInputService.InputBegan:Connect(function(input, gp) if gp then return end local key = input.KeyCode if key == Enum.KeyCode.W then Keys.W = true end if key == Enum.KeyCode.A then Keys.A = true end if key == Enum.KeyCode.S then Keys.S = true end if key == Enum.KeyCode.D then Keys.D = true end if key == Enum.KeyCode.Space then Keys.Space = true end if key == Enum.KeyCode.LeftControl or key == Enum.KeyCode.RightControl then Keys.Ctrl = true end if key == Enum.KeyCode.F then toggleFly() end -- быстрый тогл на F end) UserInputService.InputEnded:Connect(function(input) local key = input.KeyCode if key == Enum.KeyCode.W then Keys.W = false end if key == Enum.KeyCode.A then Keys.A = false end if key == Enum.KeyCode.S then Keys.S = false end if key == Enum.KeyCode.D then Keys.D = false end if key == Enum.KeyCode.Space then Keys.Space = false end if key == Enum.KeyCode.LeftControl or key == Enum.KeyCode.RightControl then Keys.Ctrl = false end end) -- При респавне выключаем LocalPlayer.CharacterAdded:Connect(function() if Flying then stopFly() end end) print("[Minimal Fly] loaded • F = toggle")