Posted
I made Rivals Silent Aim and it seems to be detected.
If you put 150 damage, you have to die, but sometimes you don't die even if you put 200 damage
Does anyone know about this?
The script source is as follows
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")
local Camera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local Settings = {
Enabled = true,
FOV = 150,
TargetPart = "Head",
}
local function GetClosestTarget()
local closest, closestDist = nil, Settings.FOV
local screenCenter = Camera.ViewportSize / 2
for _, entity in ipairs(CollectionService:GetTagged("Entity")) do
if entity == LocalPlayer.Character then continue end
local hum = entity:FindFirstChildOfClass("Humanoid")
local root = entity:FindFirstChild("HumanoidRootPart")
local targetPart = entity:FindFirstChild(Settings.TargetPart)
if not hum or hum.Health <= 0 or not targetPart then continue end
local pos, onScreen = Camera:WorldToViewportPoint(targetPart.Position)
if onScreen then
local dist = (Vector2.new(pos.X, pos.Y) - screenCenter).Magnitude
if dist < closestDist then
closest = entity
closestDist = dist
end
end
end
return closest
end
local Utility = require(ReplicatedStorage:WaitForChild("Modules"):WaitForChild("Utility"))
local oldRaycast;
oldRaycast = hookfunction(Utility.Raycast, function(self, origin, target, distance, filter, ...)
if not checkcaller() and Settings.Enabled and (distance == 999 or distance == 400) then
local targetEntity = GetClosestTarget()
if targetEntity then
local targetPart = targetEntity:FindFirstChild(Settings.TargetPart)
if targetPart then
return oldRaycast(self, origin, targetPart.Position, distance, filter, ...)
end
end
end
return oldRaycast(self, origin, target, distance, filter, ...)
end)Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post