-- ============================================== -- 【左右分栏】左按钮 + 右边输入框 -- UI整体加宽 输入框全部放在UI右侧单独一栏 -- 可拖动 + 最小化 + 点击弹窗提示 -- ============================================== local partsize = 1 local WallRange = 5 local WallConn = nil -- 清除旧UI pcall(function() if getgenv().NinjaMainGui then getgenv().NinjaMainGui:Destroy() end end) -- 服务 local UIS = game:GetService("UserInputService") local Player = game.Players.LocalPlayer -- 主GUI local NinjaMainGui = Instance.new("ScreenGui") NinjaMainGui.Name = "NinjaMainGui" NinjaMainGui.ResetOnSpawn = false NinjaMainGui.Parent = Player.PlayerGui getgenv().NinjaMainGui = NinjaMainGui -- ========== 主窗口【超级加宽 左右分栏】 ========== local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 520, 0, 460) MainFrame.Position = UDim2.new(0.02,0,0.12,0) MainFrame.BackgroundColor3 = Color3.new(0.07,0.07,0.14) MainFrame.BorderColor3 = Color3.new(0,1,1) MainFrame.BorderSizePixel = 2 MainFrame.Parent = NinjaMainGui -- 顶部拖动栏 local TopBar = Instance.new("Frame") TopBar.Size = UDim2.new(1,0,0,32) TopBar.BackgroundColor3 = Color3.new(0,0.65,0.9) TopBar.Parent = MainFrame local Title = Instance.new("TextLabel") Title.Size = UDim2.new(0.85,0,1,0) Title.BackgroundTransparency = 1 Title.Text = "Xi Pro 终极战场【左按钮丨右输入框】" Title.TextColor3 = Color3.new(1,1,1) Title.TextSize = 15 Title.Parent = TopBar -- 最小化按钮 local MinBtn = Instance.new("TextButton") MinBtn.Size = UDim2.new(0,34,0,25) MinBtn.Position = UDim2.new(1,-40,0,3) MinBtn.BackgroundColor3 = Color3.new(0.1,0.1,0.1) MinBtn.Text = "—" MinBtn.TextColor3 = Color3.new(1,1,1) MinBtn.Parent = TopBar -- 提示弹窗 local Tip = Instance.new("Frame") Tip.Size = UDim2.new(0,180,0,42) Tip.Position = UDim2.new(0.5,-90,0.9,0) Tip.BackgroundColor3 = Color3.new(0,1,1) Tip.Visible = false Tip.Parent = NinjaMainGui local TipTxt = Instance.new("TextLabel") TipTxt.Size = UDim2.new(1,0,1,0) TipTxt.BackgroundTransparency = 1 TipTxt.TextColor3 = Color3.new(0,0,0) TipTxt.TextSize = 17 TipTxt.Parent = Tip -- ========== 拖动逻辑 ========== local Dragging, DragStart, StartPos TopBar.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = true DragStart = i.Position StartPos = MainFrame.Position end end) UIS.InputChanged:Connect(function(i) if Dragging and i.UserInputType == Enum.UserInputType.MouseMovement then local d = i.Position - DragStart MainFrame.Position = UDim2.new(StartPos.X.Scale, StartPos.X.Offset+d.X, StartPos.Y.Scale, StartPos.Y.Offset+d.Y) end end) UIS.InputEnded:Connect(function() Dragging = false end) -- ========== 最小化 ========== local IsMin = false local OldSize = MainFrame.Size MinBtn.MouseButton1Click:Connect(function() IsMin = not IsMin if IsMin then MainFrame.Size = UDim2.new(0,120,0,32) MinBtn.Text = "□" else MainFrame.Size = OldSize MinBtn.Text = "—" end end) -- 提示函数 local function ShowTip(msg) TipTxt.Text = msg.." 开启成功" Tip.Visible = true task.wait(0.8) Tip.Visible = false end -- ========== 【左侧按钮区域】 ========== local LeftArea = Instance.new("Frame") LeftArea.Size = UDim2.new(0.62,0,1,-36) LeftArea.Position = UDim2.new(0.02,0,0.08,0) LeftArea.BackgroundTransparency = 1 LeftArea.Parent = MainFrame -- ========== 【右侧输入框区域】 ========== local RightArea = Instance.new("Frame") RightArea.Size = UDim2.new(0.34,0,1,-36) RightArea.Position = UDim2.new(0.64,0,0.08,0) RightArea.BackgroundTransparency = 1 RightArea.Parent = MainFrame -- 右侧标题 local RightTitle = Instance.new("TextLabel") RightTitle.Size = UDim2.new(1,0,0,30) RightTitle.BackgroundTransparency = 1 RightTitle.Text = "自定义参数" RightTitle.TextColor3 = Color3.new(0,1,1) RightTitle.TextSize = 14 RightTitle.Parent = RightArea -- ========== 创建左侧按钮 ========== local function MakeLeftBtn(name,y,func) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0.95,0,0,33) btn.Position = UDim2.new(0,0,y,0) btn.BackgroundColor3 = Color3.new(0.14,0.14,0.26) btn.BorderColor3 = Color3.new(0,1,1) btn.Text = name btn.TextColor3 = Color3.new(1,1,1) btn.Parent = LeftArea btn.MouseButton1Click:Connect(function() func() ShowTip(name) end) end -- 全部左侧按钮 local t1,t2,t3,t4,t5,t6,t7 = false,false,false,false,false,false,false MakeLeftBtn("贴墙攻击",0.02,function() t1=not t1 if WallConn then WallConn:Disconnect()WallConn=nil end if t1 then WallConn=game.RunService.Heartbeat:Connect(function() local c = Player.Character if not c or not c:FindFirstChild("HumanoidRootPart")then return end local part = workspace:FindFirstChild("Map")and workspace.Map.Props.Walls.Break:FindFirstChild("Part") if not part then return end part.Size=Vector3.new(1,WallRange,WallRange) part.Transparency=0.7 part.CFrame=c.HumanoidRootPart.CFrame*CFrame.new(0,0,-5)*CFrame.Angles(0,math.rad(90),0) end) end end) MakeLeftBtn("正面防御",0.13,function() t2=not t2 pcall(function()game.ReplicatedStorage.Remotes.Combat.Block:FireServer(t2)end) end) MakeLeftBtn("攻击无冷却",0.24,function() t3=not t3 pcall(function()game.ReplicatedStorage.Settings.Cooldowns.Melee.Value=t3 and 0 or 100 end) end) MakeLeftBtn("冲刺无冷却",0.35,function() t4=not t4 pcall(function()game.ReplicatedStorage.Settings.Cooldowns.Dash.Value=t4 and 0 or 100 end) end) MakeLeftBtn("无布娃娃无后摇",0.46,function() t5=not t5 if t5 then _G.whwy=true task.spawn(function()while _G.whwy and task.wait()do pcall(function() local s=game.ReplicatedStorage.Settings s.Toggles.NoSlowdowns.Value=true s.Toggles.DisableHitStun.Value=true s.Multipliers.RagdollTimer.Value=0 end)end end) else _G.whwy=false pcall(function() local s=game.ReplicatedStorage.Settings s.Toggles.NoSlowdowns.Value=false s.Toggles.DisableHitStun.Value=false s.Multipliers.RagdollTimer.Value=100 end)end end) MakeLeftBtn("大招时间延长",0.57,function() t6=not t6 if t6 then _G.bbb=true task.spawn(function()while _G.bbb and task.wait()do pcall(function() game.ReplicatedStorage.Settings.Multipliers.UltimateTimer.Value=99999 end)end end) else _G.bbb=false pcall(function()game.ReplicatedStorage.Settings.Multipliers.UltimateTimer.Value=100 end)end end) -- 【一拳超大伤害 依然在左侧最后一个】 MakeLeftBtn("一拳超大伤害",0.68,function() t7=not t7 if t7 then _G.aaa=true task.spawn(function()while _G.aaa and task.wait()do pcall(function() game.ReplicatedStorage.Settings.Multipliers.MeleeDamage.Value=1000000 end)end end) else _G.aaa=false pcall(function()game.ReplicatedStorage.Settings.Multipliers.MeleeDamage.Value=100 end)end end) -- ========== 【右侧:单独放三个输入框】 ========== local function MakeRightInput(name,y) local f=Instance.new("Frame") f.Size=UDim2.new(1,0,0,38) f.Position=UDim2.new(0,0,y,0) f.BackgroundColor3=Color3.new(0.12,0.12,0.22) f.BorderColor3=Color3.new(0,1,1) f.Parent=RightArea local lab=Instance.new("TextLabel") lab.Size=UDim2.new(1,0,0,18) lab.Position=UDim2.new(0,0,0,2) lab.BackgroundTransparency=1 lab.Text=name lab.TextColor3=Color3.new(1,1,1) lab.Parent=f local box=Instance.new("TextBox") box.Size=UDim2.new(0.9,0,0,18) box.Position=UDim2.new(0.05,0,0.45,0) box.BackgroundColor3=Color3.new(0.2,0.2,0.35) box.Text="100" box.TextColor3=Color3.new(1,1,1) box.Parent=f return box end -- 三个输入框 全部固定在UI【右侧】 local A1 = MakeRightInput("攻击速度",0.12) local A2 = MakeRightInput("击退大小",0.32) local A3 = MakeRightInput("冲刺速度",0.52) -- 输入绑定 A1.FocusLost:Connect(function(enter) if not enter then return end pcall(function() game.ReplicatedStorage.Settings.Multipliers.MeleeSpeed.Value=tonumber(A1.Text)or 100 ShowTip("攻击速度设置成功") end) end) A2.FocusLost:Connect(function(enter) if not enter then return end pcall(function() game.ReplicatedStorage.Settings.Multipliers.RagdollPower.Value=tonumber(A2.Text)or 100 ShowTip("击退设置成功") end) end) A3.FocusLost:Connect(function(enter) if not enter then return end pcall(function() game.ReplicatedStorage.Settings.Multipliers.DashSpeed.Value=tonumber(A3.Text)or 100 ShowTip("冲刺速度设置成功") end) end) print("✅ 左按钮丨右输入框 布局完成!")