local cloneref = cloneref or function(...) return ... end local GetService = setmetatable({}, { __index = function(self, key) return cloneref(game:GetService(key)) end }) getgenv().Services = { RunService = GetService.RunService, Players = GetService.Players, UserInputService = GetService.UserInputService, CoreGui = GetService.CoreGui, TweenService = GetService.TweenService, ReplicatedStorage = GetService.ReplicatedStorage, HttpService = GetService.HttpService, Lighting = GetService.Lighting, WorkSpace = GetService.Workspace, Debris = GetService.Debris, } Services.CurrentCamera = Services.WorkSpace.CurrentCamera Services.LocalPlayer = Services.Players.LocalPlayer local HitParl = Services.ReplicatedStorage:WaitForChild("Events"):WaitForChild("HitParl") local Weapons = Services.ReplicatedStorage:WaitForChild("Weapons") local PlayerGui = Services.LocalPlayer:WaitForChild("PlayerGui") local firebullet local function findFireBullet() for _, fn in ipairs(getgc(false)) do if type(fn) == "function" and islclosure(fn) then local ok, consts = pcall(debug.getconstants, fn) if ok and consts then local hit, rep, range, melee = false, false, false, false for i = 1, #consts do local c = consts[i] if c == "HitParl" then hit = true elseif c == "ReplicateShot" then rep = true elseif c == "Range" then range = true elseif c == "Melee" then melee = true end end if hit and rep and range and melee then return fn end end end end end firebullet = findFireBullet() local function encodeHitPos(pos) return Vector3.new( ((pos.X - 156325) * 13 + 17854) * 16, (pos.Y + 64000) * 7 - 142657, (pos.Z * 9 - 47000) * 6 ) end local function isEnemy(player) if player == Services.LocalPlayer then return false end local myStatus = Services.LocalPlayer:FindFirstChild("Status") local theirStatus = player:FindFirstChild("Status") if myStatus and theirStatus and myStatus:FindFirstChild("Team") and theirStatus:FindFirstChild("Team") then return myStatus.Team.Value ~= theirStatus.Team.Value end return true end local function Closest() local camera = Services.WorkSpace.CurrentCamera or Services.CurrentCamera if not camera then return end local origin = camera.CFrame.Position local closest, closestDistance closestDistance = math.huge for _, player in ipairs(Services.Players:GetPlayers()) do if isEnemy(player) and player.Character then local character = player.Character local humanoid = character:FindFirstChildOfClass("Humanoid") or character:FindFirstChild("Humanoid2") local head = character:FindFirstChild("HeadHB") or character:FindFirstChild("FakeHead") or character:FindFirstChild("Head") if humanoid and humanoid.Health > 0 and head then local distance = (head.Position - origin).Magnitude if distance < closestDistance then closestDistance = distance closest = head end end end end return closest end local function getRange() local banana = Weapons:FindFirstChild("Banana") if banana and banana:FindFirstChild("Melee") then return 48 end if banana and banana:FindFirstChild("Range") then return banana.Range.Value end return 48 end local function fireHitParl(head) local character = Services.LocalPlayer.Character local gunModel = character and character:FindFirstChild("Gun") if not head or not gunModel then return end local rangeValue = getRange() local camera = Services.WorkSpace.CurrentCamera or Services.CurrentCamera local cameraPosition = camera and camera.CFrame.Position or head.Position local normal = head.Position - cameraPosition if normal.Magnitude > 0 then normal = normal.Unit else normal = Vector3.new(0, 1, 0) end HitParl:FireServer( head, encodeHitPos(head.Position), "Banana", rangeValue, gunModel, nil, 1, rangeValue == 48, true, cameraPosition, Services.WorkSpace:GetServerTimeNow(), normal, true, true, true, true, true, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) end task.spawn(function() while true do task.wait(0.08) local head = Closest() if head then if not firebullet then firebullet = findFireBullet() end if firebullet then pcall(firebullet) end pcall(fireHitParl, head) end end end)