Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.Enable = true
- while _G.Enable and wait() do
- function damage()
- for i, v in pairs(workspace.Towers:GetChildren()) do
- if
- v.Type.Value ~= "Farm" and v.Type.Value ~= "Pursuit" and v.Type.Value ~= "Commando" and
- v.Type.Value ~= "Paintballer" and
- v.Type.Value ~= "Rocketeer" and
- v.Type.Value ~= "Mortar" and
- v.Type.Value ~= "DJ Booth" and
- v.Type.Value ~= "Demoman" and
- v.Type.Value ~= "Military Base"
- then
- if v.HumanoidRootPart:FindFirstChild("BillboardGui") ~= nil then
- v.HumanoidRootPart:FindFirstChild("BillboardGui").TextLabel.Text = tostring(v.TotalDamage.Value)
- else -- Happens if there is no BillboardGui
- local BillboardGui = Instance.new("BillboardGui", v.HumanoidRootPart)
- BillboardGui.Size = UDim2.new(0, 100, 0, 40)
- BillboardGui.StudsOffset = Vector3.new(0, 2, 0)
- BillboardGui.Adornee = v.HumanoidRootPart
- local TextLabel = Instance.new("TextLabel")
- TextLabel.Parent = BillboardGui
- TextLabel.BackgroundTransparency = 1
- TextLabel.BorderSizePixel = 0
- TextLabel.Text = tostring(v.TotalDamage.Value)
- TextLabel.Font = "ArialBold"
- TextLabel.FontSize = "Size14"
- TextLabel.TextStrokeTransparency = 0
- TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- TextLabel.TextColor3 = Color3.new(255, 255, 255)
- TextLabel.Size = UDim2.new(1, 0, 0.5, 0)
- end -- lines 6-23
- elseif v.Type.Value == "Pursuit" or v.Type.Value == "Commando" then
- if v.HumanoidRootPart.Ring:FindFirstChild("BillboardGui") ~= nil then
- v.HumanoidRootPart.Ring:FindFirstChild("BillboardGui").TextLabel.Text =
- tostring(v.TotalDamage.Value)
- else -- Happens if there is no BillboardGui
- local BillboardGui = Instance.new("BillboardGui", v.HumanoidRootPart.Ring)
- BillboardGui.Size = UDim2.new(0, 100, 0, 40)
- BillboardGui.StudsOffset = Vector3.new(0, 3, 0)
- BillboardGui.Adornee = v.HumanoidRootPart.Ring
- local TextLabel = Instance.new("TextLabel")
- TextLabel.Parent = BillboardGui
- TextLabel.BackgroundTransparency = 1
- TextLabel.BorderSizePixel = 0
- TextLabel.Text = tostring(v.TotalDamage.Value)
- TextLabel.Font = "ArialBold"
- TextLabel.FontSize = "Size14"
- TextLabel.TextStrokeTransparency = 0
- TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- TextLabel.TextColor3 = Color3.new(255, 255, 255)
- TextLabel.Size = UDim2.new(1, 0, 0.5, 0)
- end -- lines 26-43
- end
- end
- end
- pcall(damage)
- end
Add Comment
Please, Sign In to add comment