Advertisement
AlexRobKitYT

Notify()

Feb 14th, 2021 (edited)
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.18 KB | None | 0 0
  1. local function hide(ui)
  2.     game:GetService("TweenService"):Create(ui, TweenInfo.new(0.5,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out), {Position = UDim2.new(0.5,0,-1,0)}):Play()
  3. end
  4.  
  5. local function show(ui,Ti)
  6.     game:GetService("TweenService"):Create(ui, TweenInfo.new(0.5,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out), {Position = UDim2.new(0.5,0,0.2,0)}):Play()
  7.     wait(Ti)
  8.     if ui then
  9.         hide(ui)
  10.     end
  11.     return true
  12. end
  13.  
  14. local library = {}
  15.  
  16. function library:win()
  17.     local Notification = Instance.new("ScreenGui")
  18.     local Main = Instance.new("Frame")
  19.     local UICorner = Instance.new("UICorner")
  20.     local Title = Instance.new("TextLabel")
  21.     local Description = Instance.new("TextLabel")
  22.     local Buttons = Instance.new("Frame")
  23.     local UICorner_2 = Instance.new("UICorner")
  24.     local UIListLayout = Instance.new("UIListLayout")
  25.     local Button = Instance.new("TextButton")
  26.     local UICorner_3 = Instance.new("UICorner")
  27.     local TextLabel = Instance.new("TextLabel")
  28.    
  29.     local LibraryMsg = {}
  30.    
  31.     function LibraryMsg:create(tit,msg,btns,Time)
  32.         Notification.Name="Notification" Notification.Parent=game:GetService("CoreGui") Notification.Enabled=true Notification.ZIndexBehavior=Enum.ZIndexBehavior.Sibling Notification.ResetOnSpawn=false Main.Name="Main" Main.Parent=Notification Main.AnchorPoint=Vector2.new(0.5,0.5) Main.BackgroundColor3=Color3.fromRGB(45,45,45) Main.Position=UDim2.new(0.5,0,-1,0) Main.Size=UDim2.new(0.349999994,0,0.300000012,0) UICorner.Parent=Main Title.Name="Title" Title.Parent=Main Title.BackgroundColor3=Color3.fromRGB(255,255,255) Title.BackgroundTransparency=1.000 Title.BorderSizePixel=0 Title.Size=UDim2.new(1,0,0.200000003,0) Title.Font=Enum.Font.GothamBold Title.Text="Title" Title.TextColor3=Color3.fromRGB(255,255,255) Title.TextScaled=true Title.TextSize=14.000 Title.TextWrapped=true Title.TextXAlignment=Enum.TextXAlignment.Left Description.Name="Description" Description.Parent=Main Description.BackgroundColor3=Color3.fromRGB(255,255,255) Description.BackgroundTransparency=1.000 Description.BorderSizePixel=0 Description.Position=UDim2.new(0,0,0.200000003,0) Description.Size=UDim2.new(1,0,0.400000006,0) Description.Font=Enum.Font.GothamBold Description.Text="oh hi for using this LocalModule!" Description.TextColor3=Color3.fromRGB(255,255,255) Description.TextSize=14.000 Description.TextWrapped=true Description.TextXAlignment=Enum.TextXAlignment.Left Description.TextYAlignment=Enum.TextYAlignment.Top Buttons.Name="Buttons" Buttons.Parent=Main Buttons.BackgroundColor3=Color3.fromRGB(62,62,62) Buttons.Position=UDim2.new(0,0,0.600000024,0) Buttons.Size=UDim2.new(1,0,0.400000006,0) UICorner_2.Parent=Buttons UIListLayout.Parent=Buttons UIListLayout.FillDirection=Enum.FillDirection.Horizontal UIListLayout.HorizontalAlignment=Enum.HorizontalAlignment.Center UIListLayout.SortOrder=Enum.SortOrder.LayoutOrder UIListLayout.VerticalAlignment=Enum.VerticalAlignment.Center UIListLayout.Padding=UDim.new(0,5) Button.Name="Button" Button.Parent=Notification Button.BackgroundColor3=Color3.fromRGB(77,100,150) Button.BorderSizePixel=0 Button.Size=UDim2.new(0,115,0,45) Button.Visible=false Button.ZIndex=50 Button.AutoButtonColor=false Button.Font=Enum.Font.GothamSemibold Button.Text="" Button.TextColor3=Color3.fromRGB(255,255,255) Button.TextScaled=true Button.TextSize=14.000 Button.TextWrapped=true UICorner_3.Parent=Button TextLabel.Parent=Button TextLabel.AnchorPoint=Vector2.new(0.5,0.5) TextLabel.BackgroundColor3=Color3.fromRGB(255,255,255) TextLabel.BackgroundTransparency=1.000 TextLabel.BorderColor3=Color3.fromRGB(27,42,53) TextLabel.BorderSizePixel=0 TextLabel.Position=UDim2.new(0.5,0,0.5,0) TextLabel.Size=UDim2.new(1,-20,1,-20) TextLabel.ZIndex=2 TextLabel.Font=Enum.Font.GothamSemibold TextLabel.Text="TextButton" TextLabel.TextColor3=Color3.fromRGB(255,255,255) TextLabel.TextScaled=true TextLabel.TextSize=14.000 TextLabel.TextWrapped=true
  33.         -- ok
  34.         for i,v in pairs(btns) do
  35.             local mmm = Button:Clone()
  36.             mmm.Parent = Buttons
  37.             mmm.TextLabel.Text = v[1]
  38.            
  39.             mmm.MouseButton1Click:Connect(function()
  40.                 pcall(v[2] or function() end)
  41.             end)
  42.            
  43.         end
  44.        
  45.         Title.Text = tit
  46.         Description.Text = msg
  47.  
  48.         show(Main,Time)
  49.        
  50.     end
  51.    
  52.     return LibraryMsg
  53. end
  54.  
  55. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement