local plr = game.Players.LocalPlayer
local goal, hook
local rs = game:GetService("RunService")
local uis = game:GetService("UserInputService")
rs.Stepped:Connect(function()
local dist = 9e9
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("Script") and v.Parent.Name == "Union" then
local mag = plr:DistanceFromCharacter(v.Parent.Position)
if dist > mag then
dist = mag; goal = v.Parent;
end
end
end
end)
uis.InputBegan:Connect(function(key, gpe)
if not gpe and key.KeyCode == Enum.KeyCode.X then
if _G.Toggled then
_G.Toggled = false
game.StarterGui:SetCore("SendNotification", {
Title = "EAU Aimbot",
Text = "Aimbot Currently Disabled",
Duration = 2
})
else
_G.Toggled = true
game.StarterGui:SetCore("SendNotification", {
Title = "EAU Aimbot",
Text = "Aimbot Currently Enabled",
Duration = 2
})
end
end
end)
hook = hookmetamethod(game, "__namecall", newcclosure(function(self, ...)
local args, nc = {...}, getnamecallmethod()
if nc == "FireServer" and tostring(self) == "shoot_event" and goal ~= nil and _G.Toggled then
local vector = goal.Position + Vector3.new(0, 50, 0) - plr.Character.Humanoid.MoveDirection
local unit = (vector - plr.Character.Head.Position).Unit
local spawnPos = plr.Character.PrimaryPart.Position + unit * 3.8
if spawnPos.Y - plr.Character.PrimaryPart.Position.Y < 4 then
spawnPos = plr.Character.PrimaryPart.Position + unit * 4
end
args[1] = vector
args[2] = spawnPos
end
return hook(self, unpack(args))
end))