SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Gui to Lua
  2. -- Version: 3
  3.  
  4. -- Instances:
  5.  
  6. local BigPaintball = Instance.new("ScreenGui")
  7. local Frame = Instance.new("Frame")
  8. local Status = Instance.new("TextLabel")
  9. local StatusLabel = Instance.new("TextLabel")
  10.  
  11. local plr = game:GetService("Players").LocalPlayer
  12. local round_type = game:GetService("Workspace")["__VARIABLES"].RoundType
  13. local guns_folder = game:GetService("Workspace")["__DEBRIS"].Guns
  14. local RS = game:GetService("RunService")
  15. local UIS = game:GetService("UserInputService")
  16.  
  17. local active = false
  18.  
  19. --Properties:
  20.  
  21. BigPaintball.Name = "BigPaintball"
  22. BigPaintball.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  23. BigPaintball.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  24.  
  25. Frame.Parent = BigPaintball
  26. Frame.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
  27. Frame.Position = UDim2.new(0.0154226255, 0, 0.484094083, 0)
  28. Frame.Size = UDim2.new(0, 105, 0, 107)
  29.  
  30. Status.Name = "Status"
  31. Status.Parent = Frame
  32. Status.BackgroundColor3 = Color3.new(0.27451, 0.27451, 0.27451)
  33. Status.Position = UDim2.new(0.0761904791, 0, 0.410247862, 0)
  34. Status.Size = UDim2.new(0, 89, 0, 48)
  35. Status.Font = Enum.Font.SourceSans
  36. Status.Text = "Off"
  37. Status.TextColor3 = Color3.new(1, 0, 0)
  38. Status.TextSize = 25
  39.  
  40. StatusLabel.Name = "StatusLabel"
  41. StatusLabel.Parent = Frame
  42. StatusLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  43. StatusLabel.BackgroundTransparency = 1
  44. StatusLabel.Position = UDim2.new(0.22857143, 0, 0.0602408424, 0)
  45. StatusLabel.Size = UDim2.new(0, 56, 0, 31)
  46. StatusLabel.Font = Enum.Font.SourceSans
  47. StatusLabel.Text = "Status:"
  48. StatusLabel.TextColor3 = Color3.new(1, 1, 1)
  49. StatusLabel.TextSize = 25
  50.  
  51. local function getPlayer()
  52.     local char = plr.Character or plr.CharacterAdded:Wait()
  53.     local humr = char:WaitForChild("HumanoidRootPart")
  54.  
  55.     return char, humr
  56. end
  57.  
  58. local function get_target_players()
  59.     local current_guns = guns_folder:GetChildren()
  60.     local target_players = {}
  61.  
  62.         for i,v in next, current_guns do
  63.             local player = game:GetService("Players"):FindFirstChild(v.Name)
  64.  
  65.             if player then
  66.                 if round_type.Value:lower():match("tdm") and player.Team ~= plr.Team then
  67.                     table.insert(target_players, player)
  68.                 elseif round_type.Value:lower():match("ffa") and player.UserId ~= plr.UserId then
  69.                     table.insert(target_players, player)
  70.                 end
  71.             end
  72.         end
  73.  
  74.     return target_players
  75. end
  76.  
  77. UIS.InputBegan:Connect(function(k)
  78.     print("Button")
  79.     if k.KeyCode == Enum.KeyCode.Backquote then
  80.         if not active then
  81.             active = true
  82.             Status.Text = "On"
  83.             Status.TextColor3 = Color3.new(0, 1, 0)
  84.         else
  85.             active = false
  86.             Status.Text = "Off"
  87.             Status.TextColor3 = Color3.new(1, 0, 0)
  88.         end
  89.     end
  90. end)
  91.  
  92. while RS.RenderStepped:Wait() do
  93.     if active then
  94.         local targets = get_target_players()
  95.    
  96.         for i,v in next, targets do
  97.             local cam = workspace.CurrentCamera
  98.    
  99.             repeat
  100.                 local char, humr = getPlayer()
  101.                 local target_char = v.Character if not target_char then break end
  102.                 local target_humr = target_char:WaitForChild("HumanoidRootPart")
  103.    
  104.                 humr.CFrame = target_humr.CFrame - target_humr.CFrame.lookVector * 5
  105.                 cam.CFrame = CFrame.new(cam.CFrame.p, target_humr.Position)
  106.                 RS.RenderStepped:Wait()
  107.             until not guns_folder:FindFirstChild(v.Name) or not active
  108.         end
  109.     end
  110. 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
 
Top