SHARE
TWEET

Untitled

a guest Dec 9th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if _G.active == nil then
  2.     _G.active = true
  3. end
  4.  
  5. local plr = game:GetService("Players").LocalPlayer
  6. local round_type = game:GetService("Workspace")["__VARIABLES"].RoundType
  7. local guns_folder = game:GetService("Workspace")["__DEBRIS"].Guns
  8. local RS = game:GetService("RunService")
  9.  
  10. local function getPlayer()
  11.     local char = plr.Character or plr.CharacterAdded:Wait()
  12.     local humr = char:WaitForChild("HumanoidRootPart")
  13.  
  14.     return char, humr
  15. end
  16.  
  17. local function get_target_players()
  18.     local current_guns = guns_folder:GetChildren()
  19.     local target_players = {}
  20.  
  21.         for i,v in next, current_guns do
  22.             local player = game:GetService("Players"):FindFirstChild(v.Name)
  23.  
  24.             if player then
  25.                 if round_type.Value:lower():match("tdm") and player.Team ~= plr.Team then
  26.                     table.insert(target_players, player)
  27.                 elseif round_type.Value:lower():match("ffa") and player.UserId ~= plr.UserId then
  28.                     table.insert(target_players, player)
  29.                 end
  30.             end
  31.         end
  32.  
  33.     return target_players
  34. end
  35.  
  36. while RS.RenderStepped:Wait() and _G.active do
  37.     local targets = get_target_players()
  38.  
  39.     for i,v in next, targets do
  40.         local cam = workspace.CurrentCamera
  41.  
  42.         repeat
  43.             local char, humr = getPlayer()
  44.             local target_char = v.Character if not target_char then break end
  45.             local target_humr = target_char:WaitForChild("HumanoidRootPart")
  46.  
  47.             humr.CFrame = target_humr.CFrame - target_humr.CFrame.lookVector * 5
  48.             cam.CFrame = CFrame.new(cam.CFrame.p, target_humr.Position)
  49.             RS.RenderStepped:Wait()
  50.         until not guns_folder:FindFirstChild(v.Name) or not _G.active
  51.     end
  52. end
  53. RAW Paste Data
  54. if _G.active == nil then
  55.     _G.active = true
  56. end
  57.  
  58. local plr = game:GetService("Players").LocalPlayer
  59. local round_type = game:GetService("Workspace")["__VARIABLES"].RoundType
  60. local guns_folder = game:GetService("Workspace")["__DEBRIS"].Guns
  61. local RS = game:GetService("RunService")
  62.  
  63. local function getPlayer()
  64.     local char = plr.Character or plr.CharacterAdded:Wait()
  65.     local humr = char:WaitForChild("HumanoidRootPart")
  66.  
  67.     return char, humr
  68. end
  69.  
  70. local function get_target_players()
  71.     local current_guns = guns_folder:GetChildren()
  72.     local target_players = {}
  73.  
  74.         for i,v in next, current_guns do
  75.             local player = game:GetService("Players"):FindFirstChild(v.Name)
  76.  
  77.             if player then
  78.                 if round_type.Value:lower():match("tdm") and player.Team ~= plr.Team then
  79.                     table.insert(target_players, player)
  80.                 elseif round_type.Value:lower():match("ffa") and player.UserId ~= plr.UserId then
  81.                     table.insert(target_players, player)
  82.                 end
  83.             end
  84.         end
  85.  
  86.     return target_players
  87. end
  88.  
  89. while RS.RenderStepped:Wait() and _G.active do
  90.     local targets = get_target_players()
  91.  
  92.     for i,v in next, targets do
  93.         local cam = workspace.CurrentCamera
  94.  
  95.         repeat
  96.             local char, humr = getPlayer()
  97.             local target_char = v.Character if not target_char then break end
  98.             local target_humr = target_char:WaitForChild("HumanoidRootPart")
  99.  
  100.             humr.CFrame = target_humr.CFrame - target_humr.CFrame.lookVector * 5
  101.             cam.CFrame = CFrame.new(cam.CFrame.p, target_humr.Position)
  102.             RS.RenderStepped:Wait()
  103.         until not guns_folder:FindFirstChild(v.Name) or not _G.active
  104.     end
  105. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top