SHOW:
|
|
- or go back to the newest paste.
| 1 | local library = {count = 0};
| |
| 2 | ||
| 3 | if game:GetService("CoreGui"):FindFirstChild("UI Library") then
| |
| 4 | game:GetService("CoreGui"):FindFirstChild("UI Library"):Destroy()
| |
| 5 | end | |
| 6 | ||
| 7 | local UILibrary = Instance.new("ScreenGui")
| |
| 8 | UILibrary.Name = "UI Library" | |
| 9 | UILibrary.Parent = game:GetService("CoreGui")
| |
| 10 | ||
| 11 | ||
| 12 | function library.CreateWindow(WName) | |
| 13 | library.count = library.count + 1 | |
| 14 | local ui = {};
| |
| 15 | local Holder = Instance.new("ImageLabel")
| |
| 16 | local WindowText = Instance.new("TextLabel")
| |
| 17 | local Container = Instance.new("ImageLabel")
| |
| 18 | local ToggleGUI = Instance.new("TextButton")
| |
| 19 | local UIListLayout = Instance.new("UIListLayout")
| |
| 20 | local UIPadding = Instance.new("UIPadding")
| |
| 21 | ||
| 22 | Holder.Name = WName | |
| 23 | Holder.Parent = UILibrary | |
| 24 | Holder.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 25 | Holder.BackgroundTransparency = 1.000 | |
| 26 | Holder.BorderSizePixel = 0 | |
| 27 | Holder.Position = UDim2.new(0, (15 + (202 * library.count) - 200), 0.002, 0) | |
| 28 | Holder.Size = UDim2.new(0, 200, 0, 39) | |
| 29 | Holder.ZIndex = 5 | |
| 30 | Holder.Image = "rbxassetid://3570695787" | |
| 31 | Holder.ImageColor3 = Color3.fromRGB(26, 26, 26) | |
| 32 | Holder.ScaleType = Enum.ScaleType.Slice | |
| 33 | Holder.SliceCenter = Rect.new(100, 100, 100, 100) | |
| 34 | Holder.SliceScale = 0.040 | |
| 35 | ||
| 36 | ToggleGUI.Name = "ToggleGUI" | |
| 37 | ToggleGUI.Parent = Holder | |
| 38 | ToggleGUI.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 39 | ToggleGUI.BackgroundTransparency = 1.000 | |
| 40 | ToggleGUI.BorderSizePixel = 0 | |
| 41 | ToggleGUI.Position = UDim2.new(0.852380931, 0, 0, 0) | |
| 42 | ToggleGUI.Size = UDim2.new(0, 31, 0, 38) | |
| 43 | ToggleGUI.ZIndex = 6 | |
| 44 | ToggleGUI.Font = Enum.Font.GothamBold | |
| 45 | ToggleGUI.Text = "▼" | |
| 46 | ToggleGUI.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 47 | ToggleGUI.TextSize = 17.000 | |
| 48 | ||
| 49 | Container.Name = "Container" | |
| 50 | Container.Parent = Holder | |
| 51 | Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 52 | Container.BackgroundTransparency = 1.000 | |
| 53 | Container.ClipsDescendants = true | |
| 54 | Container.Size = UDim2.new(0, 200, 0, 77) | |
| 55 | Container.ZIndex = 2 | |
| 56 | Container.Image = "rbxassetid://3570695787" | |
| 57 | Container.ImageColor3 = Color3.fromRGB(35, 35, 35) | |
| 58 | Container.ScaleType = Enum.ScaleType.Slice | |
| 59 | Container.SliceCenter = Rect.new(100, 100, 100, 100) | |
| 60 | Container.SliceScale = 0.040 | |
| 61 | ||
| 62 | WindowText.Name = WName | |
| 63 | WindowText.Parent = Holder | |
| 64 | WindowText.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 65 | WindowText.BackgroundTransparency = 1.000 | |
| 66 | WindowText.BorderSizePixel = 0 | |
| 67 | WindowText.Position = UDim2.new(0.0399999991, 0, 0.15384616, 0) | |
| 68 | WindowText.Size = UDim2.new(0, 186, 0, 27) | |
| 69 | WindowText.ZIndex = 5 | |
| 70 | WindowText.Font = Enum.Font.SourceSans | |
| 71 | WindowText.Text = WName | |
| 72 | WindowText.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 73 | WindowText.TextSize = 22.000 | |
| 74 | WindowText.TextXAlignment = Enum.TextXAlignment.Left | |
| 75 | ||
| 76 | UIListLayout.Parent = Container | |
| 77 | UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder | |
| 78 | UIListLayout.Padding = UDim.new(0, 1) | |
| 79 | ||
| 80 | UIPadding.Parent = Container | |
| 81 | UIPadding.PaddingTop = UDim.new(0, 40) | |
| 82 | ||
| 83 | local NewWindow = Holder; | |
| 84 | --//ALL CREDITS GO TO Google Chrome\\-- | |
| 85 | ||
| 86 | local players = game:service('Players');
| |
| 87 | local player = players.LocalPlayer; | |
| 88 | local mouse = player:GetMouse(); | |
| 89 | local run = game:service('RunService');
| |
| 90 | local stepped = run.Stepped; | |
| 91 | draggable = function(obj) | |
| 92 | spawn(function() | |
| 93 | obj.Active = true; | |
| 94 | local minitial; | |
| 95 | local initial; | |
| 96 | local isdragging; | |
| 97 | obj.InputBegan:Connect(function(input) | |
| 98 | if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then | |
| 99 | isdragging = true; | |
| 100 | minitial = input.Position; | |
| 101 | initial = obj.Position; | |
| 102 | local con; | |
| 103 | con = stepped:Connect(function() | |
| 104 | if isdragging then | |
| 105 | local delta = Vector3.new(mouse.X, mouse.Y, 0) - minitial; | |
| 106 | obj.Position = UDim2.new(initial.X.Scale, initial.X.Offset + delta.X, initial.Y.Scale, initial.Y.Offset + delta.Y); | |
| 107 | else | |
| 108 | con:Disconnect(); | |
| 109 | end; | |
| 110 | end); | |
| 111 | input.Changed:Connect(function() | |
| 112 | if input.UserInputState == Enum.UserInputState.End then | |
| 113 | isdragging = false; | |
| 114 | end; | |
| 115 | end); | |
| 116 | end; | |
| 117 | end); | |
| 118 | end) | |
| 119 | end; | |
| 120 | ||
| 121 | draggable(Holder) | |
| 122 | ||
| 123 | local TweenService = game:GetService("TweenService");
| |
| 124 | local function Rotation(Object,RotateAMT,Delay) | |
| 125 | local ToTween = Object | |
| 126 | local tweenInfo = TweenInfo.new(Delay,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0) | |
| 127 | local Tweener = TweenService:Create(ToTween,tweenInfo,{Rotation = RotateAMT})
| |
| 128 | Tweener:Play() | |
| 129 | end | |
| 130 | ||
| 131 | local Enabled = false; | |
| 132 | ||
| 133 | NewWindow:FindFirstChild("ToggleGUI").MouseButton1Click:Connect(function()
| |
| 134 | Enabled = not Enabled | |
| 135 | if Enabled then | |
| 136 | Rotation(NewWindow:FindFirstChild("ToggleGUI"),90,.2)
| |
| 137 | else | |
| 138 | Rotation(NewWindow:FindFirstChild("ToggleGUI"),0,.2)
| |
| 139 | end | |
| 140 | wait() | |
| 141 | local y = 36 | |
| 142 | for i, v in pairs(Container:GetChildren()) do | |
| 143 | if not v:IsA("UIPadding") and not v:IsA("UIListLayout") then
| |
| 144 | y = y + (v.AbsoluteSize.Y + 3.5) | |
| 145 | end | |
| 146 | end | |
| 147 | ||
| 148 | local targetSize = Enabled and UDim2.new(0, 200, 0, 0) or UDim2.new(0, 200, 0, y+0.5); | |
| 149 | local targetDirection = Enabled and "Out" or "In" | |
| 150 | ||
| 151 | Container:TweenSize(targetSize, targetDirection, "Linear", 0.15, true) | |
| 152 | end) | |
| 153 | print("Some of wally's functions was used :)")
| |
| 154 | local function Resize() | |
| 155 | local y = 36 | |
| 156 | for i, v in pairs(Container:GetChildren()) do | |
| 157 | if not v:IsA("UIPadding") and not v:IsA("UIListLayout") then
| |
| 158 | y = y + (v.AbsoluteSize.Y + 3.5) | |
| 159 | end | |
| 160 | end | |
| 161 | Container.Size = UDim2.new(Container.Size.X.Scale, Container.Size.X.Offset, 0, y) | |
| 162 | end | |
| 163 | ||
| 164 | function ui.Button(Name,callback) | |
| 165 | local ButtonHolder = Instance.new("Frame")
| |
| 166 | local Button = Instance.new("TextButton")
| |
| 167 | local Button_Roundify_5px = Instance.new("ImageLabel")
| |
| 168 | ||
| 169 | ButtonHolder.Name = "ButtonHolder" | |
| 170 | ButtonHolder.Parent = Container | |
| 171 | ButtonHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 172 | ButtonHolder.BackgroundTransparency = 1.000 | |
| 173 | ButtonHolder.BorderSizePixel = 0 | |
| 174 | ButtonHolder.Position = UDim2.new(0, 0, 0.519480586, 0) | |
| 175 | ButtonHolder.Size = UDim2.new(0, 200, 0, 37) | |
| 176 | ButtonHolder.ZIndex = 2 | |
| 177 | ||
| 178 | Button.Name = "Button" | |
| 179 | Button.Parent = ButtonHolder | |
| 180 | Button.BackgroundColor3 = Color3.fromRGB(45, 45, 45) | |
| 181 | Button.BackgroundTransparency = 1.000 | |
| 182 | Button.BorderSizePixel = 0 | |
| 183 | Button.Position = UDim2.new(0.0299999993, 0, 0.0810000002, 0) | |
| 184 | Button.Size = UDim2.new(0, 190, 0, 30) | |
| 185 | Button.ZIndex = 4 | |
| 186 | Button.Font = Enum.Font.SourceSans | |
| 187 | Button.Text = Name | |
| 188 | Button.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 189 | Button.TextSize = 22.000 | |
| 190 | Button.TextWrapped = true | |
| 191 | Button.ClipsDescendants = true; | |
| 192 | ||
| 193 | Button_Roundify_5px.Name = "Button_Roundify_5px" | |
| 194 | Button_Roundify_5px.Parent = Button | |
| 195 | Button_Roundify_5px.Active = true | |
| 196 | Button_Roundify_5px.AnchorPoint = Vector2.new(0.5, 0.5) | |
| 197 | Button_Roundify_5px.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 198 | Button_Roundify_5px.BackgroundTransparency = 1.000 | |
| 199 | Button_Roundify_5px.Position = UDim2.new(0.5, 0, 0.5, 0) | |
| 200 | Button_Roundify_5px.Selectable = true | |
| 201 | Button_Roundify_5px.Size = UDim2.new(1, 0, 1, 0) | |
| 202 | Button_Roundify_5px.ZIndex = 3 | |
| 203 | Button_Roundify_5px.Image = "rbxassetid://3570695787" | |
| 204 | Button_Roundify_5px.ImageColor3 = Color3.fromRGB(45, 45, 45) | |
| 205 | Button_Roundify_5px.ScaleType = Enum.ScaleType.Slice | |
| 206 | Button_Roundify_5px.SliceCenter = Rect.new(100, 100, 100, 100) | |
| 207 | Button_Roundify_5px.SliceScale = 0.050 | |
| 208 | ||
| 209 | local Circle = Instance.new("ImageLabel")
| |
| 210 | Circle.Name = "Circle" | |
| 211 | Circle.Parent = game.CoreGui | |
| 212 | Circle.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 213 | Circle.BackgroundTransparency = 1.000 | |
| 214 | Circle.ZIndex = 10 | |
| 215 | Circle.Image = "http://www.roblox.com/asset/?id=33112574" | |
| 216 | Circle.ImageColor3 = Color3.fromRGB(126, 126, 126) | |
| 217 | Circle.ImageTransparency = 0.700 | |
| 218 | ||
| 219 | function CircleClick(Button, X, Y) | |
| 220 | coroutine.resume(coroutine.create(function() | |
| 221 | local Circle = game.CoreGui:WaitForChild("Circle"):Clone()
| |
| 222 | Circle.Parent = Button | |
| 223 | local NewX = X - Circle.AbsolutePosition.X | |
| 224 | local NewY = Y - Circle.AbsolutePosition.Y | |
| 225 | Circle.Position = UDim2.new(0, NewX, 0, NewY) | |
| 226 | ||
| 227 | local Size = 0 | |
| 228 | if Button.AbsoluteSize.X > Button.AbsoluteSize.Y then | |
| 229 | Size = Button.AbsoluteSize.X*1.5 | |
| 230 | elseif Button.AbsoluteSize.X < Button.AbsoluteSize.Y then | |
| 231 | Size = Button.AbsoluteSize.Y*1.5 | |
| 232 | elseif Button.AbsoluteSize.X == Button.AbsoluteSize.Y then print("This place uses a model by Come0n.") --please do not remove!
| |
| 233 | Size = Button.AbsoluteSize.X*1.5 | |
| 234 | end | |
| 235 | ||
| 236 | local Time = 0.5 | |
| 237 | Circle:TweenSizeAndPosition(UDim2.new(0, Size, 0, Size), UDim2.new(0.5, -Size/2, 0.5, -Size/2), "Out", "Quad", Time, false, nil) | |
| 238 | for i=1,10 do | |
| 239 | Circle.ImageTransparency = Circle.ImageTransparency + 0.03 | |
| 240 | wait(Time/10) | |
| 241 | end | |
| 242 | Circle:Destroy() | |
| 243 | end)) | |
| 244 | end | |
| 245 | local Mouse = game.Players.LocalPlayer:GetMouse() | |
| 246 | Button.MouseButton1Click:Connect(function() | |
| 247 | callback() | |
| 248 | CircleClick(Button,Mouse.X,Mouse.Y) | |
| 249 | end) | |
| 250 | Resize() | |
| 251 | end | |
| 252 | ||
| 253 | function ui.Slider(name,min,max,callback) | |
| 254 | local SliderHolder = Instance.new("Frame")
| |
| 255 | local SliderTitle = Instance.new("TextLabel")
| |
| 256 | local SliderFrame = Instance.new("TextButton")
| |
| 257 | local Slider = Instance.new("Frame")
| |
| 258 | local UIGradient = Instance.new("UIGradient")
| |
| 259 | local ValueText = Instance.new("TextLabel")
| |
| 260 | ||
| 261 | SliderHolder.Name = "SliderHolder" | |
| 262 | SliderHolder.Parent = Container | |
| 263 | SliderHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 264 | SliderHolder.BackgroundTransparency = 1.000 | |
| 265 | SliderHolder.BorderSizePixel = 0 | |
| 266 | SliderHolder.Position = UDim2.new(0, 0, 0.519480586, 0) | |
| 267 | SliderHolder.Size = UDim2.new(0, 200, 0, 37) | |
| 268 | SliderHolder.ZIndex = 2 | |
| 269 | ||
| 270 | SliderTitle.Name = "SliderTitle" | |
| 271 | SliderTitle.Parent = SliderHolder | |
| 272 | SliderTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 273 | SliderTitle.BackgroundTransparency = 1.000 | |
| 274 | SliderTitle.BorderSizePixel = 0 | |
| 275 | SliderTitle.Position = UDim2.new(0.0450000018, 0, 0.0810000449, 0) | |
| 276 | SliderTitle.Size = UDim2.new(0, 185, 0, 16) | |
| 277 | SliderTitle.ZIndex = 3 | |
| 278 | SliderTitle.Font = Enum.Font.SourceSansSemibold | |
| 279 | SliderTitle.LineHeight = 1.200 | |
| 280 | SliderTitle.Text = name | |
| 281 | SliderTitle.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 282 | SliderTitle.TextSize = 15.000 | |
| 283 | SliderTitle.TextXAlignment = Enum.TextXAlignment.Left | |
| 284 | ||
| 285 | SliderFrame.Name = "SliderFrame" | |
| 286 | SliderFrame.Parent = SliderHolder | |
| 287 | SliderFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 288 | SliderFrame.BorderSizePixel = 0 | |
| 289 | SliderFrame.Position = UDim2.new(0.0450000018, 0, 0.540459514, 0) | |
| 290 | SliderFrame.Size = UDim2.new(0, 185, 0, 6) | |
| 291 | SliderFrame.ZIndex = 3 | |
| 292 | SliderFrame.Font = Enum.Font.SourceSans | |
| 293 | SliderFrame.Text = "" | |
| 294 | SliderFrame.TextColor3 = Color3.fromRGB(0, 0, 0) | |
| 295 | SliderFrame.TextSize = 14.000 | |
| 296 | ||
| 297 | Slider.Name = "Slider" | |
| 298 | Slider.Parent = SliderFrame | |
| 299 | Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 300 | Slider.BorderSizePixel = 0 | |
| 301 | Slider.Size = UDim2.new(0, 0, 0, 6) | |
| 302 | Slider.ZIndex = 4 | |
| 303 | ||
| 304 | UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 0)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 116, 116))}
| |
| 305 | UIGradient.Parent = Slider | |
| 306 | ||
| 307 | ValueText.Name = "ValueText" | |
| 308 | ValueText.Parent = SliderHolder | |
| 309 | ValueText.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 310 | ValueText.BackgroundTransparency = 1.000 | |
| 311 | ValueText.BorderSizePixel = 0 | |
| 312 | ValueText.Position = UDim2.new(0.0450000018, 0, 0.0810000449, 0) | |
| 313 | ValueText.Size = UDim2.new(0, 185, 0, 16) | |
| 314 | ValueText.ZIndex = 3 | |
| 315 | ValueText.Font = Enum.Font.SourceSansSemibold | |
| 316 | ValueText.LineHeight = 1.200 | |
| 317 | ValueText.Text = ""; | |
| 318 | ValueText.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 319 | ValueText.TextSize = 15.000 | |
| 320 | ValueText.TextXAlignment = Enum.TextXAlignment.Right | |
| 321 | ||
| 322 | local UserInputService = game:GetService("UserInputService")
| |
| 323 | local RunService = game:GetService("RunService")
| |
| 324 | local Connection; | |
| 325 | ||
| 326 | local TweenService = game:GetService("TweenService")
| |
| 327 | local function Fade(Object,FadeAmount,Delay) | |
| 328 | local ToTween = Object | |
| 329 | ||
| 330 | local Tweener = TweenService:Create(ToTween,TweenInfo.new(Delay),{TextTransparency = FadeAmount})
| |
| 331 | Tweener:Play() | |
| 332 | end | |
| 333 | ||
| 334 | ||
| 335 | UserInputService.InputEnded:Connect(function(Input) | |
| 336 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 337 | if Connection then | |
| 338 | Connection:Disconnect() | |
| 339 | Connection = nil | |
| 340 | Fade(ValueText,1,.2) | |
| 341 | end | |
| 342 | end | |
| 343 | end) | |
| 344 | ||
| 345 | local Vals = {
| |
| 346 | ["Min"] = min; | |
| 347 | ["Max"] = max; | |
| 348 | } | |
| 349 | ||
| 350 | ValueText.Text = Vals.Min.."/"..Vals.Max | |
| 351 | ||
| 352 | SliderFrame.MouseButton1Down:Connect(function() | |
| 353 | if Connection then | |
| 354 | Connection:Disconnect() | |
| 355 | end | |
| 356 | Connection = RunService.RenderStepped:Connect(function() | |
| 357 | local Mouse = game:GetService("UserInputService"):GetMouseLocation()
| |
| 358 | local Percentage = math.clamp((Mouse.X - SliderFrame.AbsolutePosition.X)/(SliderFrame.AbsoluteSize.X),0,1) | |
| 359 | local GetValue = Vals.Min + (Vals.Max - Vals.Min) * Percentage | |
| 360 | ||
| 361 | GetValue = math.floor(GetValue) | |
| 362 | ||
| 363 | Slider:TweenSize(UDim2.new(Percentage,0,0,6),"Out","Linear",.03,true) | |
| 364 | ValueText.Text = GetValue.."/"..Vals.Max | |
| 365 | Fade(ValueText,0,.2) | |
| 366 | callback(tonumber(GetValue)) | |
| 367 | end) | |
| 368 | end) | |
| 369 | Resize() | |
| 370 | end | |
| 371 | ||
| 372 | function ui.Box(Name,Placeholder,callback) | |
| 373 | local BoxHolder = Instance.new("Frame")
| |
| 374 | local BoxText = Instance.new("TextLabel")
| |
| 375 | local Box = Instance.new("TextBox")
| |
| 376 | local Box_Roundify_4px = Instance.new("ImageLabel")
| |
| 377 | ||
| 378 | BoxHolder.Name = "BoxHolder" | |
| 379 | BoxHolder.Parent = Container | |
| 380 | BoxHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 381 | BoxHolder.BackgroundTransparency = 1.000 | |
| 382 | BoxHolder.BorderSizePixel = 0 | |
| 383 | BoxHolder.Position = UDim2.new(0, 0, 0.519480586, 0) | |
| 384 | BoxHolder.Size = UDim2.new(0, 200, 0, 37) | |
| 385 | BoxHolder.ZIndex = 2 | |
| 386 | ||
| 387 | BoxText.Name = "BoxText" | |
| 388 | BoxText.Parent = BoxHolder | |
| 389 | BoxText.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 390 | BoxText.BackgroundTransparency = 1.000 | |
| 391 | BoxText.BorderSizePixel = 0 | |
| 392 | BoxText.ClipsDescendants = true | |
| 393 | BoxText.Position = UDim2.new(0.0399999991, 0, 0.162162155, 0) | |
| 394 | BoxText.Size = UDim2.new(0, 94, 0, 23) | |
| 395 | BoxText.ZIndex = 3 | |
| 396 | BoxText.Font = Enum.Font.SourceSansSemibold | |
| 397 | BoxText.LineHeight = 1.100 | |
| 398 | BoxText.Text = Name | |
| 399 | BoxText.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 400 | BoxText.TextSize = 15.000 | |
| 401 | BoxText.TextXAlignment = Enum.TextXAlignment.Left | |
| 402 | ||
| 403 | Box.Name = "Box" | |
| 404 | Box.Parent = BoxHolder | |
| 405 | Box.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 406 | Box.BackgroundTransparency = 1.000 | |
| 407 | Box.BorderSizePixel = 0 | |
| 408 | Box.Position = UDim2.new(0.540000081, 0, 0.243243247, 0) | |
| 409 | Box.Size = UDim2.new(0, 85, 0, 23) | |
| 410 | Box.ZIndex = 4 | |
| 411 | Box.Font = Enum.Font.SourceSansSemibold | |
| 412 | Box.LineHeight = 1.500 | |
| 413 | Box.PlaceholderColor3 = Color3.fromRGB(255, 255, 255) | |
| 414 | Box.PlaceholderText = Placeholder | |
| 415 | Box.Text = "" | |
| 416 | Box.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 417 | Box.TextSize = 14.000 | |
| 418 | ||
| 419 | Box_Roundify_4px.Name = "Box_Roundify_4px" | |
| 420 | Box_Roundify_4px.Parent = Box | |
| 421 | Box_Roundify_4px.Active = true | |
| 422 | Box_Roundify_4px.AnchorPoint = Vector2.new(0.5, 0.5) | |
| 423 | Box_Roundify_4px.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 424 | Box_Roundify_4px.BackgroundTransparency = 1.000 | |
| 425 | Box_Roundify_4px.Position = UDim2.new(0.5, 0, 0.386363626, 0) | |
| 426 | Box_Roundify_4px.Selectable = true | |
| 427 | Box_Roundify_4px.Size = UDim2.new(1, 0, 1.04545462, 0) | |
| 428 | Box_Roundify_4px.ZIndex = 3 | |
| 429 | Box_Roundify_4px.Image = "rbxassetid://3570695787" | |
| 430 | Box_Roundify_4px.ImageColor3 = Color3.fromRGB(43, 43, 43) | |
| 431 | Box_Roundify_4px.ScaleType = Enum.ScaleType.Slice | |
| 432 | Box_Roundify_4px.SliceCenter = Rect.new(100, 100, 100, 100) | |
| 433 | Box_Roundify_4px.SliceScale = 0.040 | |
| 434 | ||
| 435 | Box.FocusLost:Connect(function(Enter) | |
| 436 | if Enter then | |
| 437 | if Box.Text ~= nil then | |
| 438 | callback(Box.Text) | |
| 439 | end | |
| 440 | end | |
| 441 | end) | |
| 442 | Resize() | |
| 443 | end | |
| 444 | ||
| 445 | function ui.Toggle(Name,callback) | |
| 446 | local Enabled = false; | |
| 447 | ||
| 448 | local ToggleHolder = Instance.new("Frame")
| |
| 449 | local ToggleImage = Instance.new("ImageLabel")
| |
| 450 | local MainToggle = Instance.new("ImageButton")
| |
| 451 | local ToggleText = Instance.new("TextLabel")
| |
| 452 | ||
| 453 | ToggleHolder.Name = "ToggleHolder" | |
| 454 | ToggleHolder.Parent = Container | |
| 455 | ToggleHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 456 | ToggleHolder.BackgroundTransparency = 1.000 | |
| 457 | ToggleHolder.BorderSizePixel = 0 | |
| 458 | ToggleHolder.Position = UDim2.new(0, 0, 0.519480586, 0) | |
| 459 | ToggleHolder.Size = UDim2.new(0, 200, 0, 37) | |
| 460 | ToggleHolder.ZIndex = 2 | |
| 461 | ||
| 462 | ToggleImage.Name = "ToggleImage" | |
| 463 | ToggleImage.Parent = ToggleHolder | |
| 464 | ToggleImage.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 465 | ToggleImage.BackgroundTransparency = 1.000 | |
| 466 | ToggleImage.BorderSizePixel = 0 | |
| 467 | ToggleImage.Position = UDim2.new(0.829999983, 0, 0.0810000002, 0) | |
| 468 | ToggleImage.Size = UDim2.new(0, 30, 0, 30) | |
| 469 | ToggleImage.ZIndex = 2 | |
| 470 | ToggleImage.Image = "http://www.roblox.com/asset/?id=4908273649" | |
| 471 | ||
| 472 | MainToggle.Name = "MainToggle" | |
| 473 | MainToggle.Parent = ToggleHolder | |
| 474 | MainToggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 475 | MainToggle.BackgroundTransparency = 1.000 | |
| 476 | MainToggle.BorderSizePixel = 0 | |
| 477 | MainToggle.Position = UDim2.new(0.829999983, 0, 0.0810000002, 0) | |
| 478 | MainToggle.Size = UDim2.new(0, 30, 0, 30) | |
| 479 | MainToggle.ZIndex = 3 | |
| 480 | - | MainToggle.Image = "https://www.roblox.com/library/4942383301/Untitled" |
| 480 | + | MainToggle.Image = rbxassetid://123456789 |
| 481 | MainToggle.ImageColor3 = Color3.fromRGB(90, 255, 115) | |
| 482 | MainToggle.ImageTransparency = 1.000 | |
| 483 | ||
| 484 | ToggleText.Name = "ToggleText" | |
| 485 | ToggleText.Parent = ToggleHolder | |
| 486 | ToggleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
| 487 | ToggleText.BackgroundTransparency = 1.000 | |
| 488 | ToggleText.BorderSizePixel = 0 | |
| 489 | ToggleText.Position = UDim2.new(0.0450000018, 0, 0.0810000449, 0) | |
| 490 | ToggleText.Size = UDim2.new(0, 157, 0, 29) | |
| 491 | ToggleText.ZIndex = 3 | |
| 492 | ToggleText.Font = Enum.Font.SourceSansSemibold | |
| 493 | ToggleText.Text = Name | |
| 494 | ToggleText.TextColor3 = Color3.fromRGB(255, 255, 255) | |
| 495 | ToggleText.TextSize = 14.000 | |
| 496 | ToggleText.TextXAlignment = Enum.TextXAlignment.Left | |
| 497 | ||
| 498 | local TweenService = game:GetService("TweenService")
| |
| 499 | ||
| 500 | local function Fade(Object,FadeAmount,Delay) | |
| 501 | local ToTween = Object | |
| 502 | ||
| 503 | local Tweener = TweenService:Create(ToTween,TweenInfo.new(Delay),{ImageTransparency = FadeAmount})
| |
| 504 | Tweener:Play() | |
| 505 | end | |
| 506 | ||
| 507 | MainToggle.MouseButton1Click:Connect(function() | |
| 508 | Enabled = not Enabled | |
| 509 | callback(Enabled) | |
| 510 | if Enabled then | |
| 511 | Fade(MainToggle,0,.2) | |
| 512 | else | |
| 513 | Fade(MainToggle,1,.2) | |
| 514 | end | |
| 515 | end) | |
| 516 | Resize() | |
| 517 | end | |
| 518 | return ui | |
| 519 | end | |
| 520 | ||
| 521 | return library |