Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Holder = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local TitleDrop = Instance.new("TextLabel")
- local ScrollingFrame = Instance.new("ScrollingFrame")
- local Title2 = Instance.new("TextLabel")
- local Title2Drop = Instance.new("TextLabel")
- ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
- Holder.Name = "Holder"
- Holder.Parent = ScreenGui
- Holder.Active = true
- Holder.AnchorPoint = Vector2.new(0, 0.5)
- Holder.BackgroundColor3 = Color3.new(0.298039, 0.298039, 0.298039)
- Holder.BorderSizePixel = 0
- Holder.Draggable = true
- Holder.Position = UDim2.new(0, 25, 0.5, 0)
- Holder.Size = UDim2.new(0, 150, 0, 250)
- Title.Name = "Title"
- Title.Parent = Holder
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.Size = UDim2.new(0, 150, 0, 10)
- Title.ZIndex = 2
- Title.Font = Enum.Font.SourceSansBold
- Title.FontSize = Enum.FontSize.Size14
- Title.Text = "TOWER BATTLES"
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.TextSize = 14
- Title.TextYAlignment = Enum.TextYAlignment.Top
- TitleDrop.Name = "TitleDrop"
- TitleDrop.Parent = Title
- TitleDrop.BackgroundColor3 = Color3.new(1, 1, 1)
- TitleDrop.BackgroundTransparency = 1
- TitleDrop.Position = UDim2.new(0, 0, 0, 1)
- TitleDrop.Size = UDim2.new(0, 150, 0, 10)
- TitleDrop.Font = Enum.Font.SourceSansBold
- TitleDrop.FontSize = Enum.FontSize.Size14
- TitleDrop.Text = "TOWER BATTLES"
- TitleDrop.TextColor3 = Color3.new(0.603922, 0.603922, 0.603922)
- TitleDrop.TextSize = 14
- TitleDrop.TextYAlignment = Enum.TextYAlignment.Top
- ScrollingFrame.Parent = Holder
- ScrollingFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- ScrollingFrame.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
- ScrollingFrame.BorderSizePixel = 0
- ScrollingFrame.Position = UDim2.new(0.5, 0, 0.5, 10)
- ScrollingFrame.Size = UDim2.new(0, 140, 0, 220)
- ScrollingFrame.BottomImage = "rbxassetid://985424344"
- ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- ScrollingFrame.MidImage = "rbxassetid://985424344"
- ScrollingFrame.ScrollBarThickness = 3
- ScrollingFrame.TopImage = "rbxassetid://985424344"
- Title2.Name = "Title2"
- Title2.Parent = Holder
- Title2.BackgroundColor3 = Color3.new(1, 1, 1)
- Title2.BackgroundTransparency = 1
- Title2.Position = UDim2.new(0, 0, 0, 10)
- Title2.Size = UDim2.new(0, 150, 0, 10)
- Title2.ZIndex = 2
- Title2.Font = Enum.Font.SourceSansBold
- Title2.FontSize = Enum.FontSize.Size14
- Title2.Text = "SPAWN GUI"
- Title2.TextColor3 = Color3.new(1, 1, 1)
- Title2.TextSize = 14
- Title2.TextYAlignment = Enum.TextYAlignment.Top
- Title2Drop.Name = "Title2Drop"
- Title2Drop.Parent = Title2
- Title2Drop.BackgroundColor3 = Color3.new(1, 1, 1)
- Title2Drop.BackgroundTransparency = 1
- Title2Drop.Position = UDim2.new(0, 0, 0, 1)
- Title2Drop.Size = UDim2.new(0, 150, 0, 10)
- Title2Drop.Font = Enum.Font.SourceSansBold
- Title2Drop.FontSize = Enum.FontSize.Size14
- Title2Drop.Text = "SPAWN GUI"
- Title2Drop.TextColor3 = Color3.new(0.603922, 0.603922, 0.603922)
- Title2Drop.TextSize = 14
- Title2Drop.TextYAlignment = Enum.TextYAlignment.Top
- --main script--
- local frameitems = {
- "Spawn Scout",
- "Spawn Sniper",
- "Spawn Fragger",
- "Spawn Shotgunner",
- "Spawn Cryo Gunner",
- "Spawn Farm",
- "Spawn Soldier",
- "Spawn Tuber",
- "Spawn Patrol",
- "Spawn Aviator",
- "Spawn Flamethrower",
- "Spawn Commando",
- "Spawn Railgunner",
- "Spawn Phaser",
- "Upgrade All Towers"
- }
- local frame = ScrollingFrame
- for i=1, #frameitems do
- local B = Instance.new("TextButton")
- local V = Instance.new("StringValue", B)
- V.Value = string.sub(frameitems[i], 7)
- B.Name = "B"
- B.Parent = frame
- B.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
- B.BorderSizePixel = 0
- B.Position = UDim2.new(0, 3, 0, (((i-1)*22)+(3*i)))
- B.Size = UDim2.new(0, 134, 0, 22)
- B.Font = Enum.Font.SourceSansBold
- B.FontSize = Enum.FontSize.Size14
- B.Text = string.upper(frameitems[i])
- B.TextColor3 = Color3.new(1, 1, 1)
- B.TextSize = 14
- frame.CanvasSize = UDim2.new(0,0,0,(#frameitems*22+(i*3)+3))
- B.MouseButton1Down:connect(function()
- if V.Value ~= "e All Towers" then
- game.Workspace.ChangeItem:InvokeServer(V.Value, 0)
- elseif V.Value == "e All Towers" then
- local ws = workspace
- local plr = game:GetService('Players').LocalPlayer
- 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
- end)
- end
Add Comment
Please, Sign In to add comment