编辑/修改脚本
取消修改
脚本名称
脚本代码
-- ============================================================================= -- 1. 强力兼容版纯文字 UI 引擎底层(无符号、支持隐藏与彻底退出) -- ============================================================================= local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local LocalPlayer = game:GetService("Players").LocalPlayer -- 暴力清理旧界面 local OldUI = game:GetService("CoreGui"):FindFirstChild("Orion_Mobile_Absolute_Fix") if OldUI then OldUI:Destroy() end local Orion = Instance.new("ScreenGui") Orion.Name = "Orion_Mobile_Absolute_Fix" Orion.ResetOnSpawn = false Orion.ZIndexBehavior = Enum.ZIndexBehavior.Sibling Orion.Parent = game:GetService("CoreGui") local OrionLib = {} local ScriptRunning = true -- 全局脚本运行状态锁 -- 手游触摸拖拽 local function MakeDraggable(DragPoint, Main) pcall(function() local Dragging, DragInput, MousePos, FramePos DragPoint.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Dragging = true MousePos = Input.Position FramePos = Main.Position Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Dragging = false end end) end end) DragPoint.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 - MousePos Main.Position = UDim2.new(FramePos.X.Scale, FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y) end end) end) end local function Create(Name, Properties) local Object = Instance.new(Name) for i, v in pairs(Properties or {}) do Object[i] = v end return Object end function OrionLib:MakeWindow(WindowConfig) WindowConfig = WindowConfig or {} WindowConfig.Name = WindowConfig.Name or "菜单" local MainWindow = Create("Frame", { Name = "MainWindow", Parent = Orion, Position = UDim2.new(0.5, -200, 0.5, -120), Size = UDim2.new(0, 400, 0, 240), BackgroundColor3 = Color3.fromRGB(25, 25, 25), BorderSizePixel = 0, Active = true }) Create("UICorner", {CornerRadius = UDim.new(0, 10), Parent = MainWindow}) Create("UIStroke", {Color = Color3.fromRGB(60, 60, 60), Thickness = 1.2, Parent = MainWindow}) local TopBar = Create("Frame", { Name = "TopBar", Parent = MainWindow, Size = UDim2.new(1, 0, 0, 38), BackgroundColor3 = Color3.fromRGB(32, 32, 32), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 10), Parent = TopBar}) MakeDraggable(TopBar, MainWindow) Create("TextLabel", { Parent = TopBar, Text = WindowConfig.Name, Position = UDim2.new(0, 12, 0, 0), Size = UDim2.new(0, 250, 1, 0), TextColor3 = Color3.fromRGB(240, 240, 240), TextSize = 14, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left, BackgroundTransparency = 1 }) -- 【修改】:纯文字隐藏按钮。点击后数据继续跑,只是看不见 local HideBtn = Create("TextButton", { Parent = TopBar, Text = "隐藏界面", Position = UDim2.new(1, -75, 0, 6), Size = UDim2.new(0, 65, 0, 26), BackgroundColor3 = Color3.fromRGB(60, 60, 60), TextColor3 = Color3.fromRGB(245, 245, 245), TextSize = 11, Font = Enum.Font.GothamBold }) Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = HideBtn}) HideBtn.MouseButton1Click:Connect(function() MainWindow.Visible = false end) local Sidebar = Create("Frame", { Parent = MainWindow, Position = UDim2.new(0, 0, 0, 38), Size = UDim2.new(0, 110, 1, -38), BackgroundColor3 = Color3.fromRGB(20, 20, 20), BorderSizePixel = 0 }) local TabHolder = Create("ScrollingFrame", { Parent = Sidebar, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, ScrollBarThickness = 0, CanvasSize = UDim2.new(0, 0, 0, 0) }) local TabList = Create("UIListLayout", {Parent = TabHolder, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 2)}) Create("UIPadding", {Parent = TabHolder, PaddingTop = UDim.new(0, 4)}) local FirstTab = true local TabFunction = {} function TabFunction:MakeTab(TabConfig) TabConfig = TabConfig or {} local TabName = TabConfig.Name or "标签" local TabBtn = Create("TextButton", { Parent = TabHolder, Size = UDim2.new(1, -8, 0, 30), BackgroundTransparency = 1, Text = TabName, TextColor3 = Color3.fromRGB(240, 240, 240), TextSize = 12, Font = Enum.Font.GothamSemibold }) local Container = Create("ScrollingFrame", { Parent = MainWindow, Position = UDim2.new(0, 115, 0, 42), Size = UDim2.new(1, -120, 1, -48), BackgroundTransparency = 1, ScrollBarThickness = 2, ScrollBarImageColor3 = Color3.fromRGB(80, 80, 80), Visible = false, CanvasSize = UDim2.new(0, 0, 0, 0) }) local ContainerList = Create("UIListLayout", {Parent = Container, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 6)}) ContainerList:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() Container.CanvasSize = UDim2.new(0, 0, 0, ContainerList.AbsoluteContentSize.Y + 10) end) if FirstTab then FirstTab = false TabBtn.Font = Enum.Font.GothamBold TabBtn.TextColor3 = Color3.fromRGB(9, 149, 98) Container.Visible = true end TabBtn.MouseButton1Click:Connect(function() for _, v in ipairs(TabHolder:GetChildren()) do if v:IsA("TextButton") then v.Font = Enum.Font.GothamSemibold v.TextColor3 = Color3.fromRGB(240, 240, 240) end end for _, v in ipairs(MainWindow:GetChildren()) do if v:IsA("ScrollingFrame") then v.Visible = false end end TabBtn.Font = Enum.Font.GothamBold TabBtn.TextColor3 = Color3.fromRGB(9, 149, 98) Container.Visible = true end) local ElementFunction = {} function ElementFunction:AddToggle(ToggleConfig) ToggleConfig = ToggleConfig or {} local Tgl = {Value = ToggleConfig.Default or false} local ItemFrame = Create("Frame", { Parent = Container, Size = UDim2.new(1, -6, 0, 36), BackgroundColor3 = Color3.fromRGB(32, 32, 32), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = ItemFrame}) Create("TextLabel", { Parent = ItemFrame, Text = ToggleConfig.Name or "开关", Position = UDim2.new(0, 10, 0, 0), Size = UDim2.new(1, -60, 1, 0), TextColor3 = Color3.fromRGB(220, 220, 220), TextSize = 12, Font = Enum.Font.GothamSemibold, TextXAlignment = Enum.TextXAlignment.Left, BackgroundTransparency = 1 }) local StateBox = Create("Frame", { Parent = ItemFrame, Position = UDim2.new(1, -46, 0.5, -9), Size = UDim2.new(0, 36, 0, 18), BackgroundColor3 = Color3.fromRGB(60, 60, 60), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 4), Parent = StateBox}) local Circle = Create("Frame", { Parent = StateBox, Position = UDim2.new(0, 3, 0.5, -6), Size = UDim2.new(0, 12, 0, 12), BackgroundColor3 = Color3.fromRGB(240, 240, 240), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = Circle}) local Clicker = Create("TextButton", { Parent = ItemFrame, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Text = "" }) local function Refresh() TweenService:Create(StateBox, TweenInfo.new(0.12), {BackgroundColor3 = Tgl.Value and Color3.fromRGB(9, 149, 98) or Color3.fromRGB(60, 60, 60)}):Play() TweenService:Create(Circle, TweenInfo.new(0.12), {Position = Tgl.Value and UDim2.new(1, -15, 0.5, -6) or UDim2.new(0, 3, 0.5, -6)}):Play() ToggleConfig.Callback(Tgl.Value) end Clicker.MouseButton1Click:Connect(function() Tgl.Value = not Tgl.Value Refresh() end) if Tgl.Value then Refresh() end return Tgl end function ElementFunction:AddSlider(SliderConfig) SliderConfig = SliderConfig or {} local Sld = {Value = SliderConfig.Default or 50} local IsDragging = false local ItemFrame = Create("Frame", { Parent = Container, Size = UDim2.new(1, -6, 0, 46), BackgroundColor3 = Color3.fromRGB(32, 32, 32), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = ItemFrame}) local Title = Create("TextLabel", { Parent = ItemFrame, Text = SliderConfig.Name or "滑块", Position = UDim2.new(0, 10, 0, 4), Size = UDim2.new(0.7, 0, 0, 16), TextColor3 = Color3.fromRGB(220, 220, 220), TextSize = 12, Font = Enum.Font.GothamSemibold, TextXAlignment = Enum.TextXAlignment.Left, BackgroundTransparency = 1 }) local ValDisplay = Create("TextLabel", { Parent = ItemFrame, Text = tostring(Sld.Value) .. " " .. (SliderConfig.ValueName or ""), Position = UDim2.new(0.7, 0, 0, 4), Size = UDim2.new(0.3, -10, 0, 16), TextColor3 = Color3.fromRGB(160, 160, 160), TextSize = 11, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Right, BackgroundTransparency = 1 }) local Track = Create("Frame", { Parent = ItemFrame, Position = UDim2.new(0, 10, 0, 28), Size = UDim2.new(1, -20, 0, 6), BackgroundColor3 = Color3.fromRGB(50, 50, 50), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 3), Parent = Track}) local Fill = Create("Frame", { Parent = Track, Size = UDim2.new(0, 0, 1, 0), BackgroundColor3 = Color3.fromRGB(9, 149, 98), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 3), Parent = Fill}) local function UpdateValue(Input) local Scale = math.clamp((Input.Position.X - Track.AbsolutePosition.X) / Track.AbsoluteSize.X, 0, 1) local ExactValue = SliderConfig.Min + ((SliderConfig.Max - SliderConfig.Min) * Scale) local IncrementedValue = math.floor(ExactValue / (SliderConfig.Increment or 1) + 0.5) * (SliderConfig.Increment or 1) Sld.Value = math.clamp(IncrementedValue, SliderConfig.Min, SliderConfig.Max) ValDisplay.Text = tostring(Sld.Value) .. " " .. (SliderConfig.ValueName or "") Fill.Size = UDim2.fromScale(Scale, 1) SliderConfig.Callback(Sld.Value) end Track.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then IsDragging = true UpdateValue(Input) end end) UserInputService.InputChanged:Connect(function(Input) if IsDragging and (Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch) then UpdateValue(Input) end end) UserInputService.InputEnded:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then IsDragging = false end end) local Percent = (Sld.Value - SliderConfig.Min) / (SliderConfig.Max - SliderConfig.Min) Fill.Size = UDim2.fromScale(math.clamp(Percent, 0, 1), 1) return Sld end -- 【纯文字】普通按钮组件 function ElementFunction:AddButton(ButtonConfig) ButtonConfig = ButtonConfig or {} local ItemFrame = Create("Frame", { Parent = Container, Size = UDim2.new(1, -6, 0, 36), BackgroundColor3 = Color3.fromRGB(45, 45, 45), BorderSizePixel = 0 }) Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = ItemFrame}) local Btn = Create("TextButton", { Parent = ItemFrame, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Text = ButtonConfig.Name or "按钮", TextColor3 = Color3.fromRGB(255, 255, 255), TextSize = 13, Font = Enum.Font.GothamBold }) Btn.MouseButton1Click:Connect(ButtonConfig.Callback or function() end) end return ElementFunction end return TabFunction end -- ============================================================================= -- 2. 核心身法引擎逻辑(使用持续推进力 BodyVelocity 彻底干预物理) -- ============================================================================= local isInfiniteSlide = false local isFlyActive = false local slideSpeed = 45 -- 集中托管力学对象 local function GetOrCreateForce(hrp, name, forceType) local force = hrp:FindFirstChild(name) if not force and ScriptRunning then force = Instance.new(forceType) force.Name = name force.MaxForce = Vector3.new(0, 0, 0) force.Velocity = Vector3.new(0, 0, 0) force.Parent = hrp end return force end RunService.Heartbeat:Connect(function() if not ScriptRunning then return end local character = LocalPlayer.Character local hrp = character and character:FindFirstChild("HumanoidRootPart") local humanoid = character and character:FindFirstChild("Humanoid") if hrp and humanoid and humanoid.Health > 0 then -- 获取或创建滑行力与飞天力 local slideForce = GetOrCreateForce(hrp, "SlideVelocityFix", "BodyVelocity") local flyForce = GetOrCreateForce(hrp, "FlyVelocityFix", "BodyVelocity") local moveDirection = humanoid.MoveDirection -- 1. 无限滑行核心逻辑 (力学强推) if isInfiniteSlide and moveDirection.Magnitude > 0 then slideForce.MaxForce = Vector3.new(500000, 0, 500000) -- 极高水平推力,打破游戏自带阻尼 slideForce.Velocity = Vector3.new( moveDirection.X * slideSpeed, 0, moveDirection.Z * slideSpeed ) -- 强制播放跑步/滑铲伪状态防止服务器由于速度差拉扯 if humanoid:GetState() ~= Enum.HumanoidStateType.Running then humanoid:ChangeState(Enum.HumanoidStateType.Running) end else slideForce.MaxForce = Vector3.new(0, 0, 0) -- 关闭滑行力 end -- 2. 飞天核心逻辑 (对抗地心引力) if isFlyActive then flyForce.MaxForce = Vector3.new(0, 500000, 0) -- 锁死垂直力 -- 如果拨动摇杆移动,给予微微上升的力;否则完全静止悬浮在空中 if moveDirection.Magnitude > 0 then flyForce.Velocity = Vector3.new(0, 15, 0) else flyForce.Velocity = Vector3.new(0, 0, 0) end else flyForce.MaxForce = Vector3.new(0, 0, 0) -- 关闭飞天力 end end end) -- 退出脚本时的彻底清洗机制 local function ShutdownScript() ScriptRunning = false isInfiniteSlide = false isFlyActive = false -- 清理地图上留存的物理推力,防止角色死锁 local character = LocalPlayer.Character local hrp = character and character:FindFirstChild("HumanoidRootPart") if hrp then local sf = hrp:FindFirstChild("SlideVelocityFix") local ff = hrp:FindFirstChild("FlyVelocityFix") if sf then sf:Destroy() end if ff then ff:Destroy() end end Orion:Destroy() -- 彻底销毁 UI end -- ============================================================================= -- 3. 构造全新纯文字 UI 面板 -- ============================================================================= local Window = OrionLib:MakeWindow({Name = "高级身法系统"}) -- 第一页:身法增强 local Tab1 = Window:MakeTab({Name = "身法增强"}) Tab1:AddToggle({ Name = "强制连续滑行", Default = false, Callback = function(Value) isInfiniteSlide = Value end }) Tab1:AddSlider({ Name = "滑行加速度修改", Min = 16, Max = 120, -- 【修改】:最高支持到 120 码 Default = 45, ValueName = "码", Increment = 1, Callback = function(Value) slideSpeed = Value end }) Tab1:AddToggle({ Name = "开启飞天悬浮", Default = false, Callback = function(Value) isFlyActive = Value end }) -- 第二页:系统设置 local Tab2 = Window:MakeTab({Name = "系统设置"}) Tab2:AddButton({ Name = "彻底退出程序", Callback = function() ShutdownScript() end }) -- 手游端唤醒悬浮窗小提示: -- 如果你点击了顶部的“隐藏界面”,可以随时在脚本执行器里再次运行此脚本来唤醒。
保存修改