auto kill
Key Required

auto kill

Craftwars ReduxT4444T4444 1.1K views 294 executesUpdated Apr 27, 2026
5.0/ 5(3 votes)
30100% Positive
Lua Script•162 lines (4651 chars)
-- Roblox LocalScript GUI: compact NPC-only cycler, mobile draggable, adjustable damage

local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local player = Players.LocalPlayer

local function getRemote()
 local backpack = player:WaitForChild("Backpack")
 local tool = backpack:FindFirstChild("Dragon's Cannon") or player.Character:WaitForChild("Dragon's Cannon",5)
 if not tool then return nil end
 return tool:WaitForChild("RemoteFunction")
end

local gui = Instance.new("ScreenGui")
gui.Name = "NPCHitGUI"
gui.ResetOnSpawn = true
gui.Parent = player:WaitForChild("PlayerGui")

local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 250, 0, 180)
frame.Position = UDim2.new(0.5, -125, 0.5, -90)
frame.BackgroundColor3 = Color3.fromRGB(20,20,26)
frame.BorderSizePixel = 0
frame.Parent = gui
Instance.new("UICorner", frame).CornerRadius = UDim.new(0,12)

local title = Instance.new("TextLabel")
title.Size = UDim2.new(1,0,0,30)
title.BackgroundTransparency = 1
title.Text = "NPC Cycler"
title.Font = Enum.Font.GothamBold
title.TextSize = 16
title.TextColor3 = Color3.fromRGB(255,255,255)
title.Parent = frame

local status = Instance.new("TextLabel")
status.Size = UDim2.new(1,-10,0,18)
status.Position = UDim2.new(0,5,0,28)
status.BackgroundTransparency = 1
status.Text = "Idle"
status.Font = Enum.Font.Gotham
status.TextSize = 12
status.TextColor3 = Color3.fromRGB(180,180,180)
status.Parent = frame

local dmgBox = Instance.new("TextBox")
dmgBox.Size = UDim2.new(1,-20,0,28)
dmgBox.Position = UDim2.new(0,10,0,52)
dmgBox.Text = "200"
dmgBox.PlaceholderText = "Damage"
dmgBox.Font = Enum.Font.Gotham
dmgBox.TextSize = 14
dmgBox.BackgroundColor3 = Color3.fromRGB(34,34,42)
dmgBox.TextColor3 = Color3.fromRGB(255,255,255)
dmgBox.BorderSizePixel = 0
dmgBox.Parent = frame
Instance.new("UICorner", dmgBox).CornerRadius = UDim.new(0,8)

local startBtn = Instance.new("TextButton")
startBtn.Size = UDim2.new(1,-20,0,34)
startBtn.Position = UDim2.new(0,10,0,92)
startBtn.Text = "START"
startBtn.Font = Enum.Font.GothamBold
startBtn.TextSize = 14
startBtn.BackgroundColor3 = Color3.fromRGB(0,170,120)
startBtn.TextColor3 = Color3.new(1,1,1)
startBtn.BorderSizePixel = 0
startBtn.Parent = frame
Instance.new("UICorner", startBtn).CornerRadius = UDim.new(0,8)

local stopBtn = Instance.new("TextButton")
stopBtn.Size = UDim2.new(1,-20,0,34)
stopBtn.Position = UDim2.new(0,10,0,134)
stopBtn.Text = "STOP"
stopBtn.Font = Enum.Font.GothamBold
stopBtn.TextSize = 14
stopBtn.BackgroundColor3 = Color3.fromRGB(190,60,60)
stopBtn.TextColor3 = Color3.new(1,1,1)
stopBtn.BorderSizePixel = 0
stopBtn.Parent = frame
Instance.new("UICorner", stopBtn).CornerRadius = UDim.new(0,8)

-- Mobile + PC draggable
local dragging = false
local dragInput, dragStart, startPos

frame.InputBegan:Connect(function(input)
 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  dragging = true
  dragStart = input.Position
  startPos = frame.Position
  input.Changed:Connect(function()
   if input.UserInputState == Enum.UserInputState.End then
    dragging = false
   end
  end)
 end
end)

frame.InputChanged:Connect(function(input)
 if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  dragInput = input
 end
end)

UIS.InputChanged:Connect(function(input)
 if dragging and input == dragInput 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)

local running = false

local function isNPC(h)
 return h and h.Parent and Players:GetPlayerFromCharacter(h.Parent) == nil
end

local function getNPCs()
 local list = {}
 for _,obj in ipairs(workspace:GetDescendants()) do
  if obj:IsA("Humanoid") and isNPC(obj) then
   table.insert(list,obj)
  end
 end
 return list
end

local function hit(h,dmg)
 local remote = getRemote()
 if not remote then return end
 local args = {
  "hit",
  {h, dmg}
 }
 remote:InvokeServer(unpack(args))
end

startBtn.MouseButton1Click:Connect(function()
 if running then return end
 running = true
 task.spawn(function()
  while running do
   local npcs = getNPCs()
   local dmg = tonumber(dmgBox.Text) or 200
   for i,v in ipairs(npcs) do
    if not running then break end
    if v and v.Parent then
     status.Text = v.Parent.Name .. " ("..i.."/"..#npcs..")"
     pcall(function() hit(v,dmg) end)
     task.wait(0.1)
    end
   end
   task.wait(0.1)
  end
  status.Text = "Stopped"
 end)
end)

stopBtn.MouseButton1Click:Connect(function()
 running = false
end)

Features & Information

need dragon cannon cause sword is patched and won't do above 15 damage if you can get dragon cannon from idk what drops it anymore you can do up to infinite damage to everything in the game

Community Comments (1)

T4444T4444Apr 27, 2026

cycles through every enemy/ore In the game with dragon cannon just killing them with the amount of damage you put

More Scripts for Craftwars Redux