Da
Da
LocalPlayer
local mouse = localPlayer:GetMouse()
local teamCheck = true
for i, v in pairs(game:GetService("Players"):GetPlayers()) do
if v.Name ~= localPlayer.Name then
if v.Character and v.Character:FindFirstChild("Humanoid") and
v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart")
and v.Character:FindFirstChild("Head") and teamCheck and v.Team ~= localPlayer.Team
then
local magnitude = (v.Character.HumanoidRootPart.Position -
localPlayer.Character.HumanoidRootPart.Position).magnitude
return closestPlayer
end
game:GetService("UserInputService").InputBegan:Connect(function(input, onGui)
if not onGui and input.KeyCode == Enum.KeyCode.T then
teamCheck = not teamCheck
end
end)
local mt = getrawmetatable(game)
local oldIndex = mt.__index
local oldNamecall = mt.__namecall
if setreadonly then setreadonly(mt, false) else make_writeable(mt, true) end
local nameCallMethod = getnamecallmethod or get_namecall_method
local newClose = newcclosure or function(f) return f end
mt.__index = newClose(function(t, k)
if t == mouse and tostring(k) == "Hit" then
if getClosestPlayer().Character and
getClosestPlayer().Character:FindFirstChild("Head") then
return getClosestPlayer().Character.Head.CFrame
end
end
return oldIndex(t, k)
end)
mt.__namecall = newClose(function(...)
local method = nameCallMethod()
local args = {...}
return oldNamecall(...)
end)
local oldFunc
args[3] = {game:GetService("Workspace").IgnoreThese,
game:GetService("Players").LocalPlayer.Character,
game:GetService("Workspace").BuildStuff, game:GetService("Workspace").Map}
return oldFunc(unpack(args))
end)