Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Loop Kill For Phantom Forces
- Created By: The3Bakers#4565
- ]]
- --main Spawn Explosion Function
- local function Summoncum(x)
- local pos=x or Vector3.new()
- game:GetService("ControllerService").RemoteEvent:FireServer("newgrenade","FRAG",{["frames"]={{["v0"]=Vector3.new(),["glassbreaks"]={},["t0"]=0,["offset"]=Vector3.new(),["rot0"]=CFrame.new(0,0,0,-math.random(),-math.random(),-math.random(),-math.random(),-math.random(),math.random(),-math.random(),math.random(),math.random()),["a"]=Vector3.new(0,-80,0),["p0"]=game.Players.LocalPlayer.Character.HumanoidRootPart.Position,["rotv"]=Vector3.new(math.random(),math.random(),math.random())},{["v0"]=Vector3.new(),["glassbreaks"]={},["t0"]=.5,["a"]=Vector3.new(),["offset"]=Vector3.new(0,0,math.random()),["rot0"]=CFrame.new(0,0,0,-math.random(),-math.random(),-math.random(),-math.random(),-math.random(),math.random(),-math.random(),math.random(),math.random()),["p0"]=pos,["rotv"]=Vector3.new(math.random(),math.random(),math.random())},{["v0"]=Vector3.new(math.random(),math.random(),math.random()),["glassbreaks"]={},["t0"]=0.7215486845+math.random()/100,["a"]=Vector3.new(),["offset"]=Vector3.new(0,math.random(),0),["rot0"]=CFrame.new(0,0,0,-math.random(),-math.random(),-math.random(),-math.random(),-math.random(),math.random(),-math.random(),math.random(),math.random()),["p0"]=Vector3.new(math.random(),math.random(),math.random())+pos,["rotv"]=Vector3.new()},{["v0"]=Vector3.new(math.random(),math.random(),math.random()),["glassbreaks"]={},["t0"]=0.77335467346+math.random()/100,["a"]=Vector3.new(),["offset"]=Vector3.new(0,math.random(),0),["rot0"]=CFrame.new(0,0,0,-math.random(),-math.random(),-math.random(),-math.random(),-math.random(),math.random(),-math.random(),math.random(),math.random()),["p0"]=Vector3.new(math.random(),math.random(),math.random())+pos,["rotv"]=Vector3.new()},{["v0"]=Vector3.new(math.random(),math.random(),math.random()),["glassbreaks"]={},["t0"]=0.8215347+math.random()/100,["a"]=Vector3.new(),["offset"]=Vector3.new(0,math.random(),0),["rot0"]=CFrame.new(0,0,0,-math.random(),-math.random(),-math.random(),-math.random(),-math.random(),math.random(),-math.random(),math.random(),math.random()),["p0"]=Vector3.new(math.random(),math.random(),math.random())+pos,["rotv"]=Vector3.new()},{["v0"]=Vector3.new(math.random(),math.random(),math.random()),["glassbreaks"]={},["t0"]=0.87652410493829+math.random()/100,["a"]=Vector3.new(),["offset"]=Vector3.new(0,math.random(),0),["rot0"]=CFrame.new(0,0,0,-math.random(),-math.random(),-math.random(),-math.random(),-math.random(),math.random(),-math.random(),math.random(),math.random()),["p0"]=Vector3.new(math.random(),math.random(),math.random())+pos,["rotv"]=Vector3.new()}},["time"]=tick(),["curi"]=1,["blowuptime"]=0})
- end
- --while wait()do because renderstepped:connect was being a faggot
- while game.RunService.RenderStepped:Wait()do
- --pcall because fuck u there might be errors
- pcall(function()
- --main table of all enemy locations
- local a={}
- for _,v in pairs(game.Workspace.Players:GetChildren())do
- if v.Name~=game.Players.LocalPlayer.Team.Name then
- for _,c in pairs(v:GetChildren())do
- table.insert(a,c.HumanoidRootPart.Position)
- end
- end
- end
- if a[1]then
- --spawn and wait for grenades to be able to do damage
- game:GetService("ControllerService").RemoteEvent:FireServer("spawn")
- wait(.1)
- end
- if a[2]then
- --main thing to detect the closest 2 vectors
- local b={Vector3.new(),Vector3.new()}
- local c=math.huge
- for _,v in pairs(a)do
- for _,d in pairs(a)do
- if v~=d then
- if(v-d).Magnitude<c then
- c=(v-d).Magnitude
- b[1]=v
- b[2]=d
- end
- end
- end
- end
- if a[3]then
- --if there are 3 avalible targets nade the closest vector stuff and find 2 more random enemys
- local e={}
- for _=1,5 do
- local f=a[math.random(1,#a)]
- if not table.find(b,f)and not table.find(e,f)then
- table.insert(e,f)
- end
- if #e==2 then
- break
- end
- end
- for _,v in pairs(e)do
- Summoncum(v)
- end
- end
- Summoncum(b[1])
- elseif a[1]then
- Summoncum(a[1])
- end
- --respawn to reset the nade count
- wait(.1)
- game:GetService("ControllerService").RemoteEvent:FireServer("falldamage",69420)
- end)
- end
- --anti lag because fuck u hi-ping
- local mt=getrawmetatable(game)
- local oldNamecall=mt.__namecall
- local oldIndex=mt.__index
- setreadonly(mt,false)
- mt.__namecall=newcclosure(function(...)
- local method=getnamecallmethod()
- local args={...}
- if tostring(method)=="FireServer"then
- if args[2]~="votefromUI"and args[2]~="newgrenade"and args[2]~="falldamage"and args[2]~="spawn"and args[2]~="chatted"then
- return
- end
- end
- return oldNamecall(unpack(args))
- end)
Add Comment
Please, Sign In to add comment