Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- made by Lau
- -- script by Deidara
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local player = Instance.new("TextBox")
- local upgrade = Instance.new("TextButton")
- ScreenGui.Parent = game.CoreGui
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame.BackgroundTransparency = 0.5
- Frame.BorderSizePixel = 3
- Frame.Active = true
- Frame.Draggable = true
- Frame.Position = UDim2.new(0.411496341, 0, 0.318352073, 0)
- Frame.Size = UDim2.new(0, 200, 0, 201)
- player.Name = "player"
- player.Parent = Frame
- player.BackgroundColor3 = Color3.new(1, 1, 1)
- player.BackgroundTransparency = 0.5
- player.BorderSizePixel = 0
- player.Position = UDim2.new(0.247500002, 0, 0.482587039, 0)
- player.Size = UDim2.new(0, 102, 0, 40)
- player.Font = Enum.Font.Cartoon
- player.FontSize = Enum.FontSize.Size14
- player.Text = "Player Name"
- player.TextSize = 14
- upgrade.Name = "upgrade"
- upgrade.Parent = Frame
- upgrade.BackgroundColor3 = Color3.new(1, 1, 1)
- upgrade.BackgroundTransparency = 0.5
- upgrade.BorderSizePixel = 0
- upgrade.Position = UDim2.new(0.200000003, 0, 0.149253726, 0)
- upgrade.Size = UDim2.new(0, 121, 0, 47)
- upgrade.Font = Enum.Font.Cartoon
- upgrade.FontSize = Enum.FontSize.Size14
- upgrade.Text = "Upgrade Towers"
- upgrade.TextSize = 14
- upgrade.MouseButton1Down:connect(function()
- local ws = workspace
- local plr = game:GetService('Players')[player.Text]
- for i,v in pairs(ws.Towers:GetChildren()) do
- if v.Owner.Value == plr and v.Tower.UP1.Value < 4 then
- repeat
- workspace.HasEnough:InvokeServer('Cash',0)
- workspace.Spend:InvokeServer(0)
- workspace.UpgradeTower:InvokeServer(v.Name,0)
- until v.Tower.UP1.Value >= 4
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement