Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Save New Duplicate & Edit Just Text Twitter
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- local library = {
- windowcount = 0;
- }
- function library:CreateWindow(nametext)
- library.windowcount = library.windowcount + 1
- local Library = Instance.new("ScreenGui")
- local MainWindow = Instance.new("Frame")
- local WindowName = Instance.new("TextLabel")
- local Container = Instance.new("Frame")
- local UIGridLayout = Instance.new("UIGridLayout")
- local ToggleVisible = Instance.new("TextButton")
- local toggled = false
- Library.Name = "Library"
- Library.Parent = game.CoreGui
- Library.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- MainWindow.Name = "MainWindow"
- MainWindow.Parent = Library
- MainWindow.Active = true
- MainWindow.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
- MainWindow.BorderSizePixel = 0
- MainWindow.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
- MainWindow.Selectable = true
- MainWindow.Size = UDim2.new(0, 164, 0, 25)
- MainWindow.Draggable = true
- ToggleVisible.Name = "ToggleVisible"
- ToggleVisible.Parent = MainWindow
- ToggleVisible.BackgroundColor3 = Color3.new(1, 1, 1)
- ToggleVisible.BackgroundTransparency = 1
- ToggleVisible.Position = UDim2.new(0.865853667, 0, 0, 0)
- ToggleVisible.Size = UDim2.new(0, 22, 0, 18)
- ToggleVisible.Font = Enum.Font.SourceSans
- ToggleVisible.Text = "-"
- ToggleVisible.TextColor3 = Color3.new(1, 1, 1)
- ToggleVisible.TextSize = 30
- ToggleVisible.TextWrapped = true
- WindowName.Name = nametext.."Window"
- WindowName.Parent = MainWindow
- WindowName.BackgroundColor3 = Color3.new(1, 1, 1)
- WindowName.BackgroundTransparency = 1
- WindowName.BorderSizePixel = 0
- WindowName.Size = UDim2.new(0, 164, 0, 25)
- WindowName.Font = Enum.Font.Cartoon
- WindowName.Text = nametext
- WindowName.TextColor3 = Color3.new(1, 1, 1)
- WindowName.TextScaled = true
- WindowName.TextSize = 14
- WindowName.TextWrapped = true
- Container.Name = "Container"
- Container.Parent = MainWindow
- Container.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
- Container.BorderSizePixel = 0
- Container.Position = UDim2.new(0, 0, 1, 0)
- Container.Size = UDim2.new(0, 164, 0, 15)
- Container.Visible = true
- UIGridLayout.Parent = Container
- UIGridLayout.FillDirection = Enum.FillDirection.Vertical
- UIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout.CellPadding = UDim2.new(0, 15, 0, 5)
- UIGridLayout.CellSize = UDim2.new(0, 150, 0, 20)
- ToggleVisible.MouseButton1Click:Connect(function()
- if toggled then
- toggled = false
- ToggleVisible.Text = "+"
- Container.Visible = false
- else
- toggled = true
- ToggleVisible.Text = "-"
- Container.Visible = true
- end
- end)
- local newLib = {}
- function newLib:CreateButton(text, callback)
- callback = callback or function() end
- local Button = Instance.new("TextButton")
- Button.Name = "Button"
- Button.Parent = Container
- Button.BackgroundColor3 = Color3.new(0.243137, 0.243137, 0.243137)
- Button.BorderSizePixel = 0
- Button.Position = UDim2.new(0.0426829271, 0, 0, 0)
- Button.Size = UDim2.new(0, 200, 0, 50)
- Button.Font = Enum.Font.Cartoon
- Button.Text = text
- Button.TextColor3 = Color3.new(1, 1, 1)
- Button.TextScaled = true
- Button.TextSize = 20
- Button.TextWrapped = true
- Container.Size = Container.Size + UDim2.new(0, 0, 0, 15)
- Button.MouseButton1Click:Connect(callback)
- end
- function newLib:CreateToggle(text, callback)
- local flag = false
- text = text or "New Toggle"
- callback = callback or function() end
- local Toggle = Instance.new("TextLabel")
- local Background = Instance.new("TextButton")
- local OnOffToggle = Instance.new("TextButton")
- Toggle.Name = "Toggle"
- Toggle.Parent = Container
- Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
- Toggle.BackgroundTransparency = 1
- Toggle.Position = UDim2.new(0.0426829271, 0, 0.357142866, 0)
- Toggle.Size = UDim2.new(0, 157, 0, 20)
- Toggle.Font = Enum.Font.SourceSans
- Toggle.Text = text
- Toggle.TextColor3 = Color3.new(1, 1, 1)
- Toggle.TextScaled = true
- Toggle.TextSize = 14
- Toggle.TextWrapped = true
- Toggle.TextXAlignment = Enum.TextXAlignment.Left
- Background.Name = "Background"
- Background.Parent = Toggle
- Background.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
- Background.BorderSizePixel = 0
- Background.Position = UDim2.new(0.686666667, 0, 0, 0)
- Background.Size = UDim2.new(0, 47, 0, 18)
- Background.Font = Enum.Font.SourceSans
- Background.Text = ""
- Background.TextColor3 = Color3.new(0, 0, 0)
- Background.TextSize = 14
- OnOffToggle.Name = "OnOffToggle"
- OnOffToggle.Parent = Background
- OnOffToggle.BackgroundColor3 = Color3.new(1, 0, 0)
- OnOffToggle.Position = UDim2.new(-0.021, 0, -0.1, 0)
- OnOffToggle.Size = UDim2.new(0, 20, 0, 21)
- OnOffToggle.Font = Enum.Font.SourceSans
- OnOffToggle.Text = ""
- OnOffToggle.TextColor3 = Color3.new(0, 0, 0)
- OnOffToggle.TextSize = 14
- Container.Size = Container.Size + UDim2.new(0, 0, 0, 20)
- OnOffToggle.MouseButton1Click:Connect(function()
- if flag == false then
- flag = true
- OnOffToggle.BackgroundColor3 = Color3.fromRGB(0, 255, 127)
- OnOffToggle:TweenPosition(UDim2.new(0.681, 0, -0.1, 0))
- else
- flag = false
- OnOffToggle.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- OnOffToggle:TweenPosition(UDim2.new(-0.021, 0, -0.1, 0))
- end
- end)
- spawn(function()
- while wait() do
- if flag then
- callback();
- end
- end
- end)
- end
- return newLib
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement