Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3
- -- Instances:
- local BigPaintball = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local Status = Instance.new("TextLabel")
- local StatusLabel = Instance.new("TextLabel")
- local plr = game:GetService("Players").LocalPlayer
- local round_type = game:GetService("Workspace")["__VARIABLES"].RoundType
- local guns_folder = game:GetService("Workspace")["__DEBRIS"].Guns
- local RS = game:GetService("RunService")
- local UIS = game:GetService("UserInputService")
- local active = false
- --Properties:
- BigPaintball.Name = "BigPaintball"
- BigPaintball.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- BigPaintball.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = BigPaintball
- Frame.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
- Frame.Position = UDim2.new(0.0154226255, 0, 0.484094083, 0)
- Frame.Size = UDim2.new(0, 105, 0, 107)
- Status.Name = "Status"
- Status.Parent = Frame
- Status.BackgroundColor3 = Color3.new(0.27451, 0.27451, 0.27451)
- Status.Position = UDim2.new(0.0761904791, 0, 0.410247862, 0)
- Status.Size = UDim2.new(0, 89, 0, 48)
- Status.Font = Enum.Font.SourceSans
- Status.Text = "Off"
- Status.TextColor3 = Color3.new(1, 0, 0)
- Status.TextSize = 25
- StatusLabel.Name = "StatusLabel"
- StatusLabel.Parent = Frame
- StatusLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- StatusLabel.BackgroundTransparency = 1
- StatusLabel.Position = UDim2.new(0.22857143, 0, 0.0602408424, 0)
- StatusLabel.Size = UDim2.new(0, 56, 0, 31)
- StatusLabel.Font = Enum.Font.SourceSans
- StatusLabel.Text = "Status:"
- StatusLabel.TextColor3 = Color3.new(1, 1, 1)
- StatusLabel.TextSize = 25
- local function getPlayer()
- local char = plr.Character or plr.CharacterAdded:Wait()
- local humr = char:WaitForChild("HumanoidRootPart")
- return char, humr
- end
- local function get_target_players()
- local current_guns = guns_folder:GetChildren()
- local target_players = {}
- for i,v in next, current_guns do
- local player = game:GetService("Players"):FindFirstChild(v.Name)
- if player then
- if round_type.Value:lower():match("tdm") and player.Team ~= plr.Team then
- table.insert(target_players, player)
- elseif round_type.Value:lower():match("ffa") and player.UserId ~= plr.UserId then
- table.insert(target_players, player)
- end
- end
- end
- return target_players
- end
- UIS.InputBegan:Connect(function(k)
- print("Button")
- if k.KeyCode == Enum.KeyCode.Backquote then
- if not active then
- active = true
- Status.Text = "On"
- Status.TextColor3 = Color3.new(0, 1, 0)
- else
- active = false
- Status.Text = "Off"
- Status.TextColor3 = Color3.new(1, 0, 0)
- end
- end
- end)
- while RS.RenderStepped:Wait() do
- if active then
- local targets = get_target_players()
- for i,v in next, targets do
- local cam = workspace.CurrentCamera
- repeat
- local char, humr = getPlayer()
- local target_char = v.Character if not target_char then break end
- local target_humr = target_char:WaitForChild("HumanoidRootPart")
- humr.CFrame = target_humr.CFrame - target_humr.CFrame.lookVector * 5
- cam.CFrame = CFrame.new(cam.CFrame.p, target_humr.Position)
- RS.RenderStepped:Wait()
- until not guns_folder:FindFirstChild(v.Name) or not active
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement