--// SERVICES local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local player = Players.LocalPlayer local CoreGui = game:GetService("CoreGui") --// CHARACTER HANDLING (FIXES DEATH BREAK) local character = player.Character or player.CharacterAdded:Wait() player.CharacterAdded:Connect(function(char) character = char end) --// REMOVE OLD GUI if CoreGui:FindFirstChild("OpenSourceHub") then CoreGui.OpenSourceHub:Destroy() end --// GUI local gui = Instance.new("ScreenGui") gui.Name = "OpenSourceHub" gui.Parent = CoreGui gui.ResetOnSpawn = false local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 260, 0, 160) frame.Position = UDim2.new(0.5, -130, 0.5, -80) frame.BackgroundColor3 = Color3.fromRGB(20, 20, 30) frame.BorderSizePixel = 0 frame.Parent = gui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 12) local gradient = Instance.new("UIGradient", frame) gradient.Color = ColorSequence.new{ ColorSequenceKeypoint.new(0, Color3.fromRGB(40,40,60)), ColorSequenceKeypoint.new(1, Color3.fromRGB(15,15,25)) } local title = Instance.new("TextLabel") title.Text = "OpenSource" title.Font = Enum.Font.GothamBold title.TextSize = 20 title.TextColor3 = Color3.fromRGB(255,255,255) title.BackgroundTransparency = 1 title.Size = UDim2.new(1,0,0,40) title.Parent = frame local subtitle = Instance.new("TextLabel") subtitle.Text = "Made by _OpenSource_" subtitle.Font = Enum.Font.Gotham subtitle.TextSize = 12 subtitle.TextColor3 = Color3.fromRGB(180,180,180) subtitle.BackgroundTransparency = 1 subtitle.Position = UDim2.new(0,0,0,30) subtitle.Size = UDim2.new(1,0,0,20) subtitle.Parent = frame local button = Instance.new("TextButton") button.Size = UDim2.new(0.8, 0, 0, 50) button.Position = UDim2.new(0.1, 0, 0.55, 0) button.Text = "Kill All NPCs: OFF" button.Font = Enum.Font.GothamBold button.TextSize = 16 button.TextColor3 = Color3.fromRGB(255,255,255) button.BackgroundColor3 = Color3.fromRGB(60, 60, 90) button.Parent = frame Instance.new("UICorner", button).CornerRadius = UDim.new(0, 10) local btnGradient = Instance.new("UIGradient", button) btnGradient.Color = ColorSequence.new{ ColorSequenceKeypoint.new(0, Color3.fromRGB(80,80,120)), ColorSequenceKeypoint.new(1, Color3.fromRGB(40,40,70)) } -- Dragging local dragging, dragStart, startPos frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = frame.Position end end) frame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) UIS.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) --// TOGGLE local enabled = false button.MouseButton1Click:Connect(function() enabled = not enabled button.Text = enabled and "Kill All NPCs: ON" or "Kill All NPCs: OFF" end) --// SAFE REMOTE FINDER (FIXES UNEQUIP BREAK) local function getRemote() local function scan(container) if not container then return end for _, tool in pairs(container:GetChildren()) do if tool:IsA("Tool") then local server = tool:FindFirstChild("GunScript_Server") if server then local remote = server:FindFirstChild("InflictTarget") if remote then return remote end end end end end return scan(player:FindFirstChild("Backpack")) or scan(character) end --// NPC SCAN (SAFE) local function getNPCs() local list = {} for _, obj in pairs(workspace:GetDescendants()) do if obj:IsA("Model") then local hum = obj:FindFirstChild("Humanoid") local root = obj:FindFirstChild("HumanoidRootPart") if hum and root and hum.Health > 0 and obj ~= character then table.insert(list, obj) end end end return list end --// ⚡ MAIN LOOP (SAFE + BURST) task.spawn(function() while true do if enabled then pcall(function() -- prevents full break local remote = getRemote() local char = character local myRoot = char and char:FindFirstChild("HumanoidRootPart") if remote and myRoot then for _, npc in pairs(getNPCs()) do local hum = npc:FindFirstChild("Humanoid") local root = npc:FindFirstChild("HumanoidRootPart") if hum and root then local direction = (root.Position - myRoot.Position).Unit local args = { hum, root, 2, direction, 0, 0, false } -- ⚡ BURST for i = 1, 3 do remote:FireServer(unpack(args)) end end end end end) end task.wait(0.05) end end)