--================================================== -- 🔨 Fire Axe UI(死亡后可反复开关 · 背包斧子可攻击,无克隆) --================================================== if not game:IsLoaded() then game.Loaded:Wait() end local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local ReplicatedStorage = game:GetService("ReplicatedStorage") --================= UI ================= local gui = Instance.new("ScreenGui") gui.ResetOnSpawn = false gui.Parent = LocalPlayer:WaitForChild("PlayerGui") local frame = Instance.new("Frame", gui) frame.Size = UDim2.fromOffset(180, 80) frame.Position = UDim2.fromScale(0.5, 0.5) frame.AnchorPoint = Vector2.new(0.5, 0.5) frame.BackgroundColor3 = Color3.fromRGB(30,30,30) frame.Active = true Instance.new("UICorner", frame) local title = Instance.new("TextLabel", frame) title.Size = UDim2.new(1,0,0,30) title.BackgroundTransparency = 1 title.Text = "Fire Axe" title.TextColor3 = Color3.new(1,1,1) title.Font = Enum.Font.SourceSansBold title.TextSize = 18 local toggle = Instance.new("TextButton", frame) toggle.Size = UDim2.fromOffset(140,30) toggle.Position = UDim2.fromOffset(20,40) toggle.Text = "OFF" toggle.BackgroundColor3 = Color3.fromRGB(150,50,50) toggle.TextColor3 = Color3.new(1,1,1) toggle.Font = Enum.Font.SourceSansBold toggle.TextSize = 16 Instance.new("UICorner", toggle) --================= 拖动 ================= do local dragging, startPos, dragStart frame.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = i.Position startPos = frame.Position i.Changed:Connect(function() if i.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) frame.InputChanged:Connect(function(i) if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then local d = i.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y ) end end) end --================= 核心变量 ================= _G.AxeEnabled = false local running = false local SwingRemote = ReplicatedStorage.Remotes:WaitForChild("Swing") --================= 攻击核心 ================= local function runAxe() if running then return end running = true task.spawn(function() while true do task.wait(0.12) if not _G.AxeEnabled then continue end local character = LocalPlayer.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") if not humanoid then continue end local backpack = LocalPlayer:FindFirstChild("Backpack") if not backpack then continue end -- ✅ 仅使用背包里已有 Fire Axe local axe = backpack:FindFirstChild("Fire Axe") if not axe then continue end -- 背包没有斧子就跳过 local Humans = workspace:FindFirstChild("Humans") if not Humans then continue end for _, human in ipairs(Humans:GetChildren()) do if human.Name ~= LocalPlayer.Name then local h = human:FindFirstChildOfClass("Humanoid") local head = human:FindFirstChild("Head") if h and h.Health > 0 and head then SwingRemote:FireServer(axe, "Hit", head) end end end end end) end --================= UI 开关 ================= toggle.MouseButton1Click:Connect(function() _G.AxeEnabled = not _G.AxeEnabled toggle.Text = _G.AxeEnabled and "ON" or "OFF" toggle.BackgroundColor3 = _G.AxeEnabled and Color3.fromRGB(50,150,50) or Color3.fromRGB(150,50,50) if _G.AxeEnabled then runAxe() end end)