Key Required
Key Required
Auto Farm
Lua Script•207 lines (6531 chars)
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Workspace = game:GetService("Workspace")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local VirtualUser = game:GetService("VirtualUser")
task.spawn(function()
while task.wait(600) do
VirtualUser:CaptureController()
VirtualUser:ClickButton2(Vector2.new())
end
end)
local ACCOUNT_1_NAME = "class_eTerNal"
local ACCOUNT_2_NAME = "Evanderugem62"
local ACCOUNT = 1
if LocalPlayer.Name == ACCOUNT_2_NAME then
ACCOUNT = 2
end
local function getOpponentName()
return (ACCOUNT == 1) and ACCOUNT_2_NAME or ACCOUNT_1_NAME
end
local knifeModule = nil
local CombatRules = nil
local StateController = nil
local function loadModules()
local playerScripts = LocalPlayer:FindFirstChild("PlayerScripts")
if playerScripts then
local controllers = playerScripts:FindFirstChild("Controllers")
if controllers then
local stateCtrl = controllers:FindFirstChild("StateController")
if stateCtrl then
pcall(function()
StateController = require(stateCtrl)
end)
end
local combat = controllers:FindFirstChild("Combat")
if combat then
local knifeCtrl = combat:FindFirstChild("KnifeController")
if knifeCtrl then
pcall(function()
knifeModule = require(knifeCtrl)
end)
end
end
end
end
if not CombatRules then
pcall(function()
CombatRules = require(ReplicatedStorage:WaitForChild("Shared"):WaitForChild("CombatRules"))
end)
end
end
loadModules()
local function hitTarget(model)
if not knifeModule or not CombatRules then return end
local hrp = model:FindFirstChild("HumanoidRootPart")
local hitPos = hrp and hrp.Position or model:GetBoundingBox().Position
pcall(function()
knifeModule:_ReportPredictedHit(model, CombatRules.AttackType.Knife, false, 1, nil, nil, hitPos)
end)
end
local function getOpponent()
local opponentName = getOpponentName()
local plr = Players:FindFirstChild(opponentName)
if plr then
local char = plr.Character
if char and char:FindFirstChild("Humanoid") and char.Humanoid.Health > 0 then
return char
end
end
return nil
end
local function isInMatch()
if StateController then
local success, result = pcall(function()
return StateController:GetState("InMatchFirstPerson")
or StateController:GetState("ActiveMatch")
or StateController:GetState("InActualMatch")
end)
if success and result == true then
return true
end
end
return false
end
local function getLeaveEvent()
local duelService = ReplicatedStorage:FindFirstChild("DuelService")
if not duelService then return nil end
local rf = duelService:FindFirstChild("RF")
if not rf then return nil end
return rf:FindFirstChild("LeaveMatch")
end
local function isWinScreenReturnVisible()
if StateController then
local success, state = pcall(function()
return StateController:GetState("WinScreen")
end)
if success and state == true then
return true
end
end
local playerGui = LocalPlayer:FindFirstChild("PlayerGui")
if not playerGui then return false end
local winScreen = playerGui:FindFirstChild("Winscreen")
if not winScreen then return false end
if winScreen:IsA("ScreenGui") and not winScreen.Enabled then
return false
end
local returnFrame = winScreen:FindFirstChild("Return")
if not returnFrame then return false end
if returnFrame:IsA("GuiObject") and not returnFrame.Visible then
return false
end
local button = returnFrame:FindFirstChild("Button")
if not button then return false end
if button:IsA("GuiObject") and not button.Visible then
return false
end
return true
end
task.spawn(function()
while task.wait(2.5) do
pcall(function()
if not isInMatch() then
local opponent = Players:FindFirstChild(getOpponentName())
if opponent then
local duelService = ReplicatedStorage:FindFirstChild("DuelService")
local RE = duelService and duelService:FindFirstChild("RE")
if RE then
if ACCOUNT == 1 then
local req = RE:FindFirstChild("RequestDuel")
if req then
req:FireServer(opponent.UserId)
end
else
local resp = RE:FindFirstChild("RespondToDuelRequest")
if resp then
resp:FireServer(opponent.UserId, true)
end
end
end
end
end
end)
end
end)
local hasTriggeredLeave = false
RunService.Heartbeat:Connect(function()
pcall(function()
local winVisible = isWinScreenReturnVisible()
if winVisible and not hasTriggeredLeave then
hasTriggeredLeave = true
local leaveEvt = getLeaveEvent()
if leaveEvt then
pcall(function() leaveEvt:InvokeServer() end)
end
end
local inMatch = isInMatch()
if inMatch and not winVisible then
hasTriggeredLeave = false
if ACCOUNT == 1 then
local opponent = getOpponent()
if opponent then
local localChar = LocalPlayer.Character
if localChar then
local localHrp = localChar:FindFirstChild("HumanoidRootPart")
if localHrp then
local targetHrp = opponent:FindFirstChild("HumanoidRootPart")
if targetHrp then
localHrp.CFrame = CFrame.new(targetHrp.Position + Vector3.new(0, 5, 0))
end
end
end
hitTarget(opponent)
end
end
end
end)
end)Features & Information
Auto Farm
U NEED TWO ACCOUNT TWO USE THIS just go into the same game on two accounts and inject --ai
Community Comments (0)
No comments yet for this script.

