Advertisement
matekaOSF2

Untitled

Jul 17th, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.24 KB | None | 0 0
  1.  
  2. Save New Duplicate & Edit Just Text Twitter
  3. 1
  4. 2
  5. 3
  6. 4
  7. 5
  8. 6
  9. 7
  10. 8
  11. 9
  12. 10
  13. 11
  14. 12
  15. 13
  16. 14
  17. 15
  18. 16
  19. 17
  20. 18
  21. 19
  22. 20
  23. 21
  24. 22
  25. 23
  26. 24
  27. 25
  28. 26
  29. 27
  30. 28
  31. 29
  32. 30
  33. 31
  34. 32
  35. 33
  36. 34
  37. 35
  38. 36
  39. 37
  40. 38
  41. 39
  42. 40
  43. 41
  44. 42
  45. 43
  46. 44
  47. 45
  48. 46
  49. 47
  50. 48
  51. 49
  52. 50
  53. 51
  54. 52
  55. 53
  56. 54
  57. 55
  58. 56
  59. 57
  60. 58
  61. 59
  62. 60
  63. 61
  64. 62
  65. 63
  66. 64
  67. 65
  68. 66
  69. 67
  70. 68
  71. 69
  72. 70
  73. 71
  74. 72
  75. 73
  76. 74
  77. 75
  78. 76
  79. 77
  80. 78
  81. 79
  82. 80
  83. 81
  84. 82
  85. 83
  86. 84
  87. 85
  88. 86
  89. 87
  90. 88
  91. 89
  92. 90
  93. 91
  94. 92
  95. 93
  96. 94
  97. 95
  98. 96
  99. 97
  100. 98
  101. 99
  102. 100
  103. 101
  104. 102
  105. 103
  106. 104
  107. 105
  108. 106
  109. 107
  110. 108
  111. 109
  112. 110
  113. 111
  114. 112
  115. 113
  116. 114
  117. 115
  118. 116
  119. 117
  120. 118
  121. 119
  122. 120
  123. 121
  124. 122
  125. 123
  126. 124
  127. 125
  128. 126
  129. 127
  130. 128
  131. 129
  132. 130
  133. 131
  134. 132
  135. 133
  136. 134
  137. 135
  138. 136
  139. 137
  140. 138
  141. 139
  142. 140
  143. 141
  144. 142
  145. 143
  146. 144
  147. 145
  148. 146
  149. 147
  150. 148
  151. 149
  152. 150
  153. 151
  154. 152
  155. 153
  156. 154
  157. 155
  158. 156
  159. 157
  160. 158
  161. 159
  162. 160
  163. 161
  164. 162
  165. 163
  166. 164
  167. 165
  168. 166
  169. 167
  170. 168
  171. 169
  172. 170
  173. 171
  174. local library = {
  175. windowcount = 0;
  176. }
  177.  
  178. function library:CreateWindow(nametext)
  179. library.windowcount = library.windowcount + 1
  180. local Library = Instance.new("ScreenGui")
  181. local MainWindow = Instance.new("Frame")
  182. local WindowName = Instance.new("TextLabel")
  183. local Container = Instance.new("Frame")
  184. local UIGridLayout = Instance.new("UIGridLayout")
  185. local ToggleVisible = Instance.new("TextButton")
  186. local toggled = false
  187.  
  188. Library.Name = "Library"
  189. Library.Parent = game.CoreGui
  190. Library.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  191.  
  192. MainWindow.Name = "MainWindow"
  193. MainWindow.Parent = Library
  194. MainWindow.Active = true
  195. MainWindow.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
  196. MainWindow.BorderSizePixel = 0
  197. MainWindow.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
  198. MainWindow.Selectable = true
  199. MainWindow.Size = UDim2.new(0, 164, 0, 25)
  200. MainWindow.Draggable = true
  201.  
  202. ToggleVisible.Name = "ToggleVisible"
  203. ToggleVisible.Parent = MainWindow
  204. ToggleVisible.BackgroundColor3 = Color3.new(1, 1, 1)
  205. ToggleVisible.BackgroundTransparency = 1
  206. ToggleVisible.Position = UDim2.new(0.865853667, 0, 0, 0)
  207. ToggleVisible.Size = UDim2.new(0, 22, 0, 18)
  208. ToggleVisible.Font = Enum.Font.SourceSans
  209. ToggleVisible.Text = "-"
  210. ToggleVisible.TextColor3 = Color3.new(1, 1, 1)
  211. ToggleVisible.TextSize = 30
  212. ToggleVisible.TextWrapped = true
  213.  
  214. WindowName.Name = nametext.."Window"
  215. WindowName.Parent = MainWindow
  216. WindowName.BackgroundColor3 = Color3.new(1, 1, 1)
  217. WindowName.BackgroundTransparency = 1
  218. WindowName.BorderSizePixel = 0
  219. WindowName.Size = UDim2.new(0, 164, 0, 25)
  220. WindowName.Font = Enum.Font.Cartoon
  221. WindowName.Text = nametext
  222. WindowName.TextColor3 = Color3.new(1, 1, 1)
  223. WindowName.TextScaled = true
  224. WindowName.TextSize = 14
  225. WindowName.TextWrapped = true
  226.  
  227. Container.Name = "Container"
  228. Container.Parent = MainWindow
  229. Container.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
  230. Container.BorderSizePixel = 0
  231. Container.Position = UDim2.new(0, 0, 1, 0)
  232. Container.Size = UDim2.new(0, 164, 0, 15)
  233. Container.Visible = true
  234.  
  235. UIGridLayout.Parent = Container
  236. UIGridLayout.FillDirection = Enum.FillDirection.Vertical
  237. UIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  238. UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  239. UIGridLayout.CellPadding = UDim2.new(0, 15, 0, 5)
  240. UIGridLayout.CellSize = UDim2.new(0, 150, 0, 20)
  241.  
  242. ToggleVisible.MouseButton1Click:Connect(function()
  243. if toggled then
  244. toggled = false
  245. ToggleVisible.Text = "+"
  246. Container.Visible = false
  247. else
  248. toggled = true
  249. ToggleVisible.Text = "-"
  250. Container.Visible = true
  251. end
  252. end)
  253.  
  254. local newLib = {}
  255.  
  256. function newLib:CreateButton(text, callback)
  257. callback = callback or function() end
  258. local Button = Instance.new("TextButton")
  259. Button.Name = "Button"
  260. Button.Parent = Container
  261. Button.BackgroundColor3 = Color3.new(0.243137, 0.243137, 0.243137)
  262. Button.BorderSizePixel = 0
  263. Button.Position = UDim2.new(0.0426829271, 0, 0, 0)
  264. Button.Size = UDim2.new(0, 200, 0, 50)
  265. Button.Font = Enum.Font.Cartoon
  266. Button.Text = text
  267. Button.TextColor3 = Color3.new(1, 1, 1)
  268. Button.TextScaled = true
  269. Button.TextSize = 20
  270. Button.TextWrapped = true
  271. Container.Size = Container.Size + UDim2.new(0, 0, 0, 15)
  272.  
  273. Button.MouseButton1Click:Connect(callback)
  274. end
  275.  
  276. function newLib:CreateToggle(text, callback)
  277. local flag = false
  278. text = text or "New Toggle"
  279. callback = callback or function() end
  280.  
  281. local Toggle = Instance.new("TextLabel")
  282. local Background = Instance.new("TextButton")
  283. local OnOffToggle = Instance.new("TextButton")
  284. Toggle.Name = "Toggle"
  285. Toggle.Parent = Container
  286. Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
  287. Toggle.BackgroundTransparency = 1
  288. Toggle.Position = UDim2.new(0.0426829271, 0, 0.357142866, 0)
  289. Toggle.Size = UDim2.new(0, 157, 0, 20)
  290. Toggle.Font = Enum.Font.SourceSans
  291. Toggle.Text = text
  292. Toggle.TextColor3 = Color3.new(1, 1, 1)
  293. Toggle.TextScaled = true
  294. Toggle.TextSize = 14
  295. Toggle.TextWrapped = true
  296. Toggle.TextXAlignment = Enum.TextXAlignment.Left
  297.  
  298. Background.Name = "Background"
  299. Background.Parent = Toggle
  300. Background.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
  301. Background.BorderSizePixel = 0
  302. Background.Position = UDim2.new(0.686666667, 0, 0, 0)
  303. Background.Size = UDim2.new(0, 47, 0, 18)
  304. Background.Font = Enum.Font.SourceSans
  305. Background.Text = ""
  306. Background.TextColor3 = Color3.new(0, 0, 0)
  307. Background.TextSize = 14
  308.  
  309. OnOffToggle.Name = "OnOffToggle"
  310. OnOffToggle.Parent = Background
  311. OnOffToggle.BackgroundColor3 = Color3.new(1, 0, 0)
  312. OnOffToggle.Position = UDim2.new(-0.021, 0, -0.1, 0)
  313. OnOffToggle.Size = UDim2.new(0, 20, 0, 21)
  314. OnOffToggle.Font = Enum.Font.SourceSans
  315. OnOffToggle.Text = ""
  316. OnOffToggle.TextColor3 = Color3.new(0, 0, 0)
  317. OnOffToggle.TextSize = 14
  318. Container.Size = Container.Size + UDim2.new(0, 0, 0, 20)
  319.  
  320. OnOffToggle.MouseButton1Click:Connect(function()
  321. if flag == false then
  322. flag = true
  323. OnOffToggle.BackgroundColor3 = Color3.fromRGB(0, 255, 127)
  324. OnOffToggle:TweenPosition(UDim2.new(0.681, 0, -0.1, 0))
  325. else
  326. flag = false
  327. OnOffToggle.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  328. OnOffToggle:TweenPosition(UDim2.new(-0.021, 0, -0.1, 0))
  329. end
  330. end)
  331.  
  332. spawn(function()
  333. while wait() do
  334. if flag then
  335. callback();
  336. end
  337. end
  338. end)
  339. end
  340.  
  341. return newLib
  342. end
  343.  
  344. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement