Script
-- Trigger Bot LocalScript with weapon blocklist
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local VirtualInputManager = game:GetService("VirtualInputManager")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
-- Settings
local PROXIMITY_RADIUS = 85 -- mouse-targeting tolerance (pixels)
local MIN_CLICK_DELAY = 0.02
local MAX_CLICK_DELAY = 0.07
local CLICK_OFFSET = 12 -- random click offset (± pixels)
-- Blocklist: trigger bot pauses while one of these is equipped
local BLOCKED_WEAPONS = {
"Fists", "Knife", "Katana", "Riot Shield", "Scythe", "Chainsaw",
"Battle Axe", "Spear", "Maul", "Trowel", "Glast Shard"
}
local triggerOn = false
local lastClick = 0
local nextClickDelay = 0
local viewModels = Workspace:FindFirstChild("ViewModels")
local firstPerson = viewModels and viewModels:FindFirstChild("FirstPerson")
-- Weapon state, updated only when the viewmodel changes
local weaponBlocked = false
local function evaluateViewmodel()
weaponBlocked = false
if not firstPerson then return end
local names = {
string.lower(LocalPlayer.Name),
string.lower(LocalPlayer.DisplayName),
}
for _, model in ipairs(firstPerson:GetDescendants()) do
if model:IsA("Model") then
local modelName = string.lower(model.Name)
local isMine = false
for _, n in ipairs(names) do
if string.find(modelName, n, 1, true) then
isMine = true
break
end
end
if isMine then
for _, weapon in ipairs(BLOCKED_WEAPONS) do
if string.find(modelName, string.lower(weapon), 1, true) then
weaponBlocked = true
return
end
end
return -- found my viewmodel; weapon not on blocklist
end
end
end
end
-- Re-evaluate ONLY when the viewmodel hierarchy changes (event-driven, no polling)
if firstPerson then
firstPerson.DescendantAdded:Connect(evaluateViewmodel)
firstPerson.DescendantRemoving:Connect(evaluateViewmodel)
evaluateViewmodel()
end
local function humanoidAtCursor()
local target = Mouse.Target
if not target then return nil end
local model = target:FindFirstAncestorOfClass("Model")
while model do
if model:FindFirstChildOfClass("Humanoid") then
return (model ~= LocalPlayer.Character) and model or nil
end
model = model.Parent
end
return nil
end
RunService.RenderStepped:Connect(function()
if not triggerOn or weaponBlocked then return end
local now = os.clock()
if now - lastClick < nextClickDelay then return end
if humanoidAtCursor() then
local pos = UserInputService:GetMouseLocation()
local x = pos.X + math.random(-CLICK_OFFSET, CLICK_OFFSET)
local y = pos.Y + math.random(-CLICK_OFFSET, CLICK_OFFSET)
VirtualInputManager:SendMouseButtonEvent(x, y, 0, true, game, 0)
VirtualInputManager:SendMouseButtonEvent(x, y, 0, false, game, 0)
lastClick = now
nextClickDelay = MIN_CLICK_DELAY + math.random() * (MAX_CLICK_DELAY - MIN_CLICK_DELAY)
end
end)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.P then
triggerOn = not triggerOn
print("Trigger Bot:", triggerOn and "ON" or "OFF")
end
end)
print("Trigger Bot:", triggerOn and "ON" or "OFF")
if weaponBlocked then
print("Trigger Bot: paused (blocked weapon equipped)")
end