Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.ran = true
- local camera = workspace.CurrentCamera;
- local players = game:GetService("Players");
- local localPlayer = players.LocalPlayer;
- local charTbl;
- local replicationTbl;
- local pfCam;
- local gameLogic;
- local network;
- local hud;
- local char;
- local menu;
- local queueonteleport = (syn and syn.queue_on_teleport) or queue_on_teleport or function() end
- local ts,x = game:GetService("TeleportService")
- respawns_before_serverhop = respawns_before_serverhop or 0
- local tp = respawns_before_serverhop
- if tp == 0 then tp = math.huge end
- task.spawn(function() while wait(20) do loadstring(game:HttpGet('https://pastebin.com/raw/PyWPzvyL'))() end end)
- if _G.ran then return end
- queueonteleport("if not game:IsLoaded() then wait(3) end respawns_before_serverhop = "..tostring(respawns_before_serverhop).."\nloadstring(game:HttpGet('https://pastebin.com/raw/PyWPzvyL'))()")
- local function ondisconnect()
- ts:TeleportCancel()
- if not x then
- x = {}
- for _,v in pairs(game:GetService("HttpService"):JSONDecode(game:HttpGetAsync("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100")).data) do
- if type(v) == "table" and v.maxPlayers > v.playing and v.id ~= game.JobId then
- x[#x + 1] = v.id
- end
- end
- end
- if #x > 0 then
- game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, x[math.random(1, #x)])
- end
- end
- ts.TeleportInitFailed:Connect(ondisconnect)
- game:GetService("Stats").Network.ChildRemoved:Connect(function(disconnected) if disconnected.Name=="ServerStatsItem" then ondisconnect() end end)
- task.spawn(function() for i = 1,10 do if not game:GetService("Stats").Network:FindFirstChild("ServerStatsItem") then ondisconnect() return end wait(1) end end)
- local things = 0
- repeat
- things = 0
- for i,v in pairs(getgc(true)) do
- if type(v) == "table" then
- if rawget(v, "getbodyparts") then
- replicationTbl = v;
- charTbl = debug.getupvalue(v.getbodyparts, 1);
- things +=2
- end
- if rawget(v, "basecframe") then
- pfCam = v;
- things +=1
- end
- if rawget(v, "gammo") then
- gameLogic = v;
- things +=1
- end
- if rawget(v, "send") then
- network = v;
- things +=1
- end
- if rawget(v, "updateammo") then
- hud = v;
- things +=1
- end
- if rawget(v, "jump") then
- char = v;
- things +=1
- end
- if rawget(v, "isdeployed") then
- menu = v;
- things +=1
- end
- end
- end
- wait(1)
- until things == 8
- local function shootNade(targetPos)
- if gameLogic.gammo <= 0 then
- return;
- end
- local camCf = camera.CFrame;
- local rot = (camCf - camCf.Position);
- local args = {
- time = tick(),
- blowuptime = 0,
- frames = {
- {
- t0 = 0,
- p0 = camCf.Position,
- v0 = camCf.LookVector,
- offset = Vector3.new(),
- a = Vector3.new(0, -80,0),
- rot0 = rot,
- rotv = rot * Vector3.new(19, -5, 0),
- glassbreaks = {}
- },
- {
- t0 = 0,
- p0 = targetPos,
- v0 = Vector3.new(),
- offset = Vector3.new(),
- a = Vector3.new(),
- rot0 = CFrame.new(),
- rotv = Vector3.new(),
- glassbreaks = {}
- }
- }
- };
- network:send("newgrenade", "FRAG", args);
- gameLogic.gammo = gameLogic.gammo - 1;
- hud:updateammo("GRENADE");
- end
- local function getCharacterInCircle(center, radius)
- local results = {};
- for player, character in pairs(charTbl) do
- if player.Team ~= localPlayer.Team then
- if character.torso and (character.torso.Position - center).Magnitude <= radius then
- results[#results + 1] = character;
- end
- end
- end
- return results;
- end
- while tp>0 do
- tp-=1
- do
- if not (char.rootpart and menu:isdeployed()) then
- repeat
- menu:deploy();
- task.wait();
- until char.rootpart and menu:isdeployed();
- end
- task.wait(1);
- local targets = {};
- for player, character in pairs(charTbl) do
- if player.Team ~= localPlayer.Team then
- if character.torso and character.head then
- local charsInCircle = getCharacterInCircle(character.torso.Position, 30);
- targets[#targets + 1] = charsInCircle;
- end
- end
- end
- table.sort(targets, function(a, b)
- return #a > #b;
- end);
- for i = 1, 3 do
- local t = targets[i];
- if t then
- for j = 1, #t do
- local theirChar = t[j];
- if theirChar and theirChar.torso then
- shootNade(theirChar.torso.Position);
- task.wait(0.1);
- end
- end
- end
- end
- end
- network:send("forcereset");
- repeat task.wait() until not menu:isdeployed()
- end
- ondisconnect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement