-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer local Viewmodel = require(ReplicatedStorage.BodycamGuns.Viewmodel) local Camera = workspace.CurrentCamera local EspFolder = (gethui and gethui()) or CoreGui local Settings = { Enabled = true, TargetPart = "Head", HitChance = 100, ESPEnabled = true, ESPColor = Color3.fromRGB(255, 60, 60) } local otherPlayers = {} local highlights = {} local charConnections = {} local function getHighlight(player) local hl = highlights[player] if not hl then hl = Instance.new("Highlight") hl.FillTransparency = 1 hl.OutlineTransparency = 0 hl.OutlineColor = Settings.ESPColor hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop hl.Enabled = false hl.Parent = EspFolder highlights[player] = hl end return hl end local function bindCharacter(player, char) if charConnections[player] then charConnections[player]:Disconnect() charConnections[player] = nil end local hl = getHighlight(player) if not char then hl.Adornee = nil hl.Enabled = false return end hl.Adornee = char hl.OutlineColor = Settings.ESPColor local hum = char:FindFirstChildOfClass("Humanoid") or char:WaitForChild("Humanoid", 5) if hum then hl.Enabled = Settings.ESPEnabled and hum.Health > 0 charConnections[player] = hum.HealthChanged:Connect(function(hp) hl.Enabled = Settings.ESPEnabled and hp > 0 end) else hl.Enabled = Settings.ESPEnabled end end local playerConnections = {} local function setupPlayer(player) if player == LocalPlayer or playerConnections[player] then return end if player.Character then bindCharacter(player, player.Character) end playerConnections[player] = { player.CharacterAdded:Connect(function(char) bindCharacter(player, char) end), player.CharacterRemoving:Connect(function() bindCharacter(player, nil) end) } end local function cleanupPlayer(player) if charConnections[player] then charConnections[player]:Disconnect() charConnections[player] = nil end if playerConnections[player] then for _, conn in playerConnections[player] do conn:Disconnect() end playerConnections[player] = nil end if highlights[player] then highlights[player]:Destroy() highlights[player] = nil end end local function refreshPlayers() table.clear(otherPlayers) for _, player in Players:GetPlayers() do if player ~= LocalPlayer then table.insert(otherPlayers, player) setupPlayer(player) end end end refreshPlayers() Players.PlayerAdded:Connect(refreshPlayers) Players.PlayerRemoving:Connect(function(player) cleanupPlayer(player) task.defer(refreshPlayers) end) workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() Camera = workspace.CurrentCamera end) local function getClosestToCenter() local viewport = Camera.ViewportSize local cx = viewport.X * 0.5 local cy = viewport.Y * 0.5 local closestPart = nil local shortestDistSq = math.huge for _, player in otherPlayers do local char = player.Character if not char then continue end local hum = char:FindFirstChildOfClass("Humanoid") if not hum or hum.Health <= 0 then continue end local part = char:FindFirstChild(Settings.TargetPart) or char:FindFirstChild("HumanoidRootPart") if not part then continue end local screenPos, onScreen = Camera:WorldToViewportPoint(part.Position) if not onScreen then continue end local dx = screenPos.X - cx local dy = screenPos.Y - cy local distSq = dx * dx + dy * dy if distSq < shortestDistSq then shortestDistSq = distSq closestPart = part end end return closestPart end local savedCF = nil local function restoreCamera() if savedCF then Camera.CFrame = savedCF savedCF = nil end end local oldIsAiming = Viewmodel.IsAiming function Viewmodel:IsAiming() if Settings.Enabled and (Settings.HitChance >= 100 or math.random(1, 100) <= Settings.HitChance) then local oldCF = Camera.CFrame local targetPart = getClosestToCenter() if targetPart then savedCF = oldCF Camera.CFrame = CFrame.lookAt(oldCF.Position, targetPart.Position) task.defer(restoreCamera) end end return oldIsAiming(self) end