-- [[ 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 LocalPlayer = Players.LocalPlayer local Workspace = game:GetService("Workspace") local RunService = game:GetService("RunService") local camera = Workspace.CurrentCamera local function GetClosestPlayer() local closestDistance = math.huge local closest = nil local myTeam = LocalPlayer:GetAttribute("Team") local lchar = LocalPlayer.Character if not lchar then return end local lhrp = lchar:FindFirstChild("Head") if not lhrp then return end for _, v in Players:GetPlayers() do if v == LocalPlayer then continue end local char = v.Character if not char then continue end if char:GetAttribute("Dead") then continue end if v:GetAttribute("Team") == myTeam then continue end local hrp = char:FindFirstChild("Head") if not hrp then continue end local screenPos, onScreen = camera:WorldToViewportPoint(hrp.Position) if not onScreen then continue end local dist = (Vector2.new(screenPos.X, screenPos.Y) - camera.ViewportSize / 2).Magnitude if dist < closestDistance then closestDistance = dist closest = hrp end end return closest end _G._bulletTPData = { target = nil, localPlayer = LocalPlayer, camera = camera, oldCast = nil, oldCastThrough = nil, } RunService.RenderStepped:Connect(function() _G._bulletTPData.target = GetClosestPlayer() end) local raycastmodule for _, obj in getgc(true) do if type(obj) == "table" and rawget(obj, "cast") and rawget(obj, "castThrough") then if type(rawget(obj, "cast")) == "function" and type(rawget(obj, "castThrough")) == "function" then raycastmodule = obj break end end end if not raycastmodule then local success, result = pcall(function() return require(game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Raycast")) end) if success and type(result) == "table" and type(result.cast) == "function" and type(result.castThrough) == "function" then raycastmodule = result end end if not raycastmodule then warn("no raycast module found, script probably wont work") return end local origENV = getfenv() local newENV = {} setmetatable(newENV, { __index = function(_, key) if key == "getgenv" or key == "hookfunction" or key == "hookfunc" or key == "replaceclosure" or key == "oth" or key == "debug" then return nil end return origENV[key] end }) newENV._bulletTPData = _G._bulletTPData newENV.typeof = typeof newENV.Vector3 = Vector3 newENV.math = math newENV.warn = warn newENV.select = select local cast = loadstring([[ return function(origin, direction, ...) local data = _bulletTPData local t = data.target if t and typeof(direction) == "Vector3" then local lchar = data.localPlayer.Character if lchar and lchar:FindFirstChild("Head") then if (origin - lchar.Head.Position).Magnitude < 12 then local targetPos = t.Position local toTarget = targetPos - origin local mag = toTarget.Magnitude if mag > 0 then local aimDir = toTarget.Unit local backDist = math.min(mag * 0.5, 2) backDist = math.max(backDist, 0.5) origin = targetPos - aimDir * backDist direction = aimDir * backDist end end end end return data.oldCast(origin, direction, ...) end ]]) local castthrough = loadstring([[ return function(origin, direction, ...) local data = _bulletTPData local t = data.target if t and typeof(direction) == "Vector3" then local lchar = data.localPlayer.Character if lchar and lchar:FindFirstChild("Head") then if (origin - lchar.Head.Position).Magnitude < 12 then local targetPos = t.Position local toTarget = targetPos - origin local mag = toTarget.Magnitude if mag > 0 then local aimDir = toTarget.Unit local backDist = math.min(mag * 0.5, 2) backDist = math.max(backDist, 0.5) origin = targetPos - aimDir * backDist direction = aimDir * backDist end end end end return data.oldCastThrough(origin, direction, ...) end ]]) pcall(function() setfenv(cast, newENV) end) pcall(function() setfenv(castthrough, newENV) end) local castHook = cast() local castThroughHook = castthrough() _G._bulletTPData.oldCast = hookfunction(raycastmodule.cast, castHook) _G._bulletTPData.oldCastThrough = hookfunction(raycastmodule.castThrough, castThroughHook)