Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getDistances(chr, folder)
- local distances = {}
- for _, v in pairs(folder:GetChildren()) do
- if v:FindFirstChild("Head") then
- local part = v:IsA("BasePart") and v or v.PrimaryPart
- local dist = (part.Position - chr.HumanoidRootPart.Position).magnitude
- table.insert(distances, {v, dist})
- end
- end
- return distances
- end
- local t = getrawmetatable(game.ReplicatedStorage.RE)
- local oldNamecall = t.__namecall
- setreadonly(t, false)
- t.__namecall = function(...)
- local a = {...}
- local fire
- if a[#a] == "FireServer" then
- fire = true
- end
- if a[2] ~= "FailedSpawnCheck" then
- if fire then
- if a[2] == "PlaceFortification" then
- a[3].FortName = "50 Cal"
- a[3].PlaceCF = a[3].PlaceCF + Vector3.new(0,1,0)
- elseif a[2] == "GenerateAreaEffect" then
- a[3].Name = "Molotov"
- end
- local ais = {}
- pcall(function()
- ais = a[3].AIs
- end)
- if ais and #ais > 0 then
- local vel = ais[1].Velocity
- local distances = getDistances(game.Players.LocalPlayer.Character, workspace.Infected)
- table.sort(distances, function(a,b)
- return a[2] < b[2]
- end)
- ais[1].Damage = 300
- ais[1].Special = "Headshot"
- local ai1 = ais[1]
- local newAis = {ai1}
- for i,v in ipairs(distances) do
- if i > 5 then break end
- if v[1] ~= ai1.AI then
- table.insert(newAis, {AI = v[1], Velocity = vel, Special = "Headshot", Damage = 300})
- end
- end
- a[3].AIs = newAis--]]
- end
- end
- return oldNamecall(unpack(a))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment