Advertisement
DankGreenMoney

test

Jun 3rd, 2022 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.52 KB | Source Code | 0 0
  1. local players = game:GetService('Players')
  2. local tweenService = game:GetService('TweenService')
  3. local runService = game:GetService('RunService')
  4. local coreGui = game:GetService('CoreGui')
  5.  
  6. local Library = {}
  7. Library.Tree = {}
  8.  
  9. function Library:Notification(title, text, timer)
  10.     Library.Tree["1"] = Instance.new("ScreenGui", runService:IsStudio() and players.LocalPlayer:WaitForChild("PlayerGui") or coreGui);
  11.     Library.Tree["1"]["IgnoreGuiInset"] = false;
  12.     Library.Tree["1"]["ScreenInsets"] = Enum.ScreenInsets.DeviceSafeInsets;
  13.     Library.Tree["1"]["Name"] = [[SolitudeNotification]];
  14.  
  15.     -- StarterGui.SolitudeNotification.Holder
  16.     Library.Tree["2"] = Instance.new("Frame", Library.Tree["1"]);
  17.     Library.Tree["2"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  18.     Library.Tree["2"]["AnchorPoint"] = Vector2.new(1, 1);
  19.     Library.Tree["2"]["BackgroundTransparency"] = 1;
  20.     Library.Tree["2"]["Size"] = UDim2.new(0, 331, 0, 579);
  21.     Library.Tree["2"]["ClipsDescendants"] = true;
  22.     Library.Tree["2"]["Position"] = UDim2.new(0.9900000095367432, 0, 0.9919999837875366, 0);
  23.     Library.Tree["2"]["Name"] = [[Holder]];
  24.  
  25.     -- StarterGui.SolitudeNotification.Holder.UIListLayout
  26.     Library.Tree["d"] = Instance.new("UIListLayout", Library.Tree["2"]);
  27.     Library.Tree["d"]["VerticalAlignment"] = Enum.VerticalAlignment.Bottom;
  28.     Library.Tree["d"]["HorizontalAlignment"] = Enum.HorizontalAlignment.Right;
  29.     Library.Tree["d"]["Padding"] = UDim.new(0, 10);
  30.     Library.Tree["d"]["SortOrder"] = Enum.SortOrder.LayoutOrder;
  31.  
  32.     -- StarterGui.SolitudeNotification.NoitificationBase
  33.     Library.Tree["4"] = Instance.new("Frame", Library.Tree["1"]);
  34.     Library.Tree["4"]["BackgroundColor3"] = Color3.fromRGB(21, 21, 21);
  35.     Library.Tree["4"]["Size"] = UDim2.new(0, 300, 0, 81);
  36.     Library.Tree["4"]["ClipsDescendants"] = true;
  37.     Library.Tree["4"]["BorderColor3"] = Color3.fromRGB(21, 21, 21);
  38.     Library.Tree["4"]["Position"] = UDim2.new(0.006228327751159668, 0, 0.8910430669784546, 0);
  39.     Library.Tree["4"]["Visible"] = false;
  40.     Library.Tree["4"]["Name"] = [[NoitificationBase]];
  41.  
  42.     -- StarterGui.SolitudeNotification.NoitificationBase.UICorner
  43.     Library.Tree["5"] = Instance.new("UICorner", Library.Tree["4"]);
  44.     Library.Tree["5"]["CornerRadius"] = UDim.new(0, 5);
  45.  
  46.     -- StarterGui.SolitudeNotification.NoitificationBase.Title
  47.     Library.Tree["6"] = Instance.new("TextLabel", Library.Tree["4"]);
  48.     Library.Tree["6"]["TextWrapped"] = true;
  49.     Library.Tree["6"]["TextTruncate"] = Enum.TextTruncate.AtEnd;
  50.     Library.Tree["6"]["TextScaled"] = true;
  51.     Library.Tree["6"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  52.     Library.Tree["6"]["TextXAlignment"] = Enum.TextXAlignment.Left;
  53.     Library.Tree["6"]["FontFace"] = Font.new([[rbxasset://fonts/families/GothamSSm.json]], Enum.FontWeight.Heavy, Enum.FontStyle.Normal);
  54.     Library.Tree["6"]["TextSize"] = 14;
  55.     Library.Tree["6"]["TextColor3"] = Color3.fromRGB(244, 245, 245);
  56.     Library.Tree["6"]["Size"] = UDim2.new(0, 241, 0, 20);
  57.     Library.Tree["6"]["ClipsDescendants"] = true;
  58.     Library.Tree["6"]["Text"] = [[Matt sent you a friend request]];
  59.     Library.Tree["6"]["Name"] = [[Title]];
  60.     Library.Tree["6"]["BackgroundTransparency"] = 1.940000057220459;
  61.     Library.Tree["6"]["Position"] = UDim2.new(0.10828572511672974, 0, 0.16298647224903107, 0);
  62.  
  63.     -- StarterGui.SolitudeNotification.NoitificationBase.Message
  64.     Library.Tree["7"] = Instance.new("TextLabel", Library.Tree["4"]);
  65.     Library.Tree["7"]["TextWrapped"] = true;
  66.     Library.Tree["7"]["TextYAlignment"] = Enum.TextYAlignment.Top;
  67.     Library.Tree["7"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  68.     Library.Tree["7"]["TextXAlignment"] = Enum.TextXAlignment.Left;
  69.     Library.Tree["7"]["FontFace"] = Font.new([[rbxasset://fonts/families/GothamSSm.json]], Enum.FontWeight.Medium, Enum.FontStyle.Normal);
  70.     Library.Tree["7"]["TextSize"] = 14;
  71.     Library.Tree["7"]["TextColor3"] = Color3.fromRGB(244, 245, 245);
  72.     Library.Tree["7"]["Size"] = UDim2.new(0, 262, 0, 38);
  73.     Library.Tree["7"]["ClipsDescendants"] = true;
  74.     Library.Tree["7"]["Text"] = [[Hey, wanna dress up as wizards and ride around on hoverboards?]];
  75.     Library.Tree["7"]["Name"] = [[Message]];
  76.     Library.Tree["7"]["BackgroundTransparency"] = 1.940000057220459;
  77.     Library.Tree["7"]["Position"] = UDim2.new(0.03828572481870651, 0, 0.4393506348133087, 0);
  78.  
  79.     -- StarterGui.SolitudeNotification.NoitificationBase.icon
  80.     Library.Tree["8"] = Instance.new("ImageLabel", Library.Tree["4"]);
  81.     Library.Tree["8"]["ScaleType"] = Enum.ScaleType.Fit;
  82.     Library.Tree["8"]["BackgroundColor3"] = Color3.fromRGB(35, 37, 51);
  83.     Library.Tree["8"]["Image"] = [[rbxassetid://3944670656]];
  84.     Library.Tree["8"]["Size"] = UDim2.new(0, 15, 0, 15);
  85.     Library.Tree["8"]["BorderColor3"] = Color3.fromRGB(35, 37, 51);
  86.     Library.Tree["8"]["Name"] = [[icon]];
  87.     Library.Tree["8"]["BackgroundTransparency"] = 1;
  88.     Library.Tree["8"]["Position"] = UDim2.new(0.038285721093416214, 0, 0.18593530356884003, 0);
  89.  
  90.     -- StarterGui.SolitudeNotification.NoitificationBase.ImageButton
  91.     Library.Tree["9"] = Instance.new("ImageButton", Library.Tree["4"]);
  92.     Library.Tree["9"]["ScaleType"] = Enum.ScaleType.Fit;
  93.     Library.Tree["9"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  94.     Library.Tree["9"]["ImageColor3"] = Color3.fromRGB(113, 116, 121);
  95.     Library.Tree["9"]["Image"] = [[rbxassetid://3944676352]];
  96.     Library.Tree["9"]["Size"] = UDim2.new(0, 15, 0, 15);
  97.     Library.Tree["9"]["Position"] = UDim2.new(0.9133332967758179, 0, 0.1917283833026886, 0);
  98.     Library.Tree["9"]["BackgroundTransparency"] = 1;
  99.  
  100.     -- StarterGui.SolitudeNotification.NoitificationBase.UIStroke
  101.     Library.Tree["a"] = Instance.new("UIStroke", Library.Tree["4"]);
  102.     Library.Tree["a"]["Color"] = Color3.fromRGB(26, 26, 26);
  103.     Library.Tree["a"]["Thickness"] = 2;
  104.  
  105.     -- StarterGui.SolitudeNotification.NoitificationBase.Shadow
  106.     Library.Tree["b"] = Instance.new("Frame", Library.Tree["4"]);
  107.     Library.Tree["b"]["ZIndex"] = 0;
  108.     Library.Tree["b"]["BorderSizePixel"] = 0;
  109.     Library.Tree["b"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  110.     Library.Tree["b"]["AnchorPoint"] = Vector2.new(0.5, 0.5);
  111.     Library.Tree["b"]["BackgroundTransparency"] = 1;
  112.     Library.Tree["b"]["Size"] = UDim2.new(1.003333330154419, 35, 1, 35);
  113.     Library.Tree["b"]["Position"] = UDim2.new(0.5016666650772095, 0, 0.5, 0);
  114.     Library.Tree["b"]["Name"] = [[Shadow]];
  115.  
  116.     -- StarterGui.SolitudeNotification.NoitificationBase.Shadow.Image
  117.     Library.Tree["c"] = Instance.new("ImageLabel", Library.Tree["b"]);
  118.     Library.Tree["c"]["BorderSizePixel"] = 0;
  119.     Library.Tree["c"]["ScaleType"] = Enum.ScaleType.Crop;
  120.     Library.Tree["c"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
  121.     Library.Tree["c"]["ImageColor3"] = Color3.fromRGB(25, 5, 12);
  122.     Library.Tree["c"]["ImageTransparency"] = 0.5299999713897705;
  123.     Library.Tree["c"]["AnchorPoint"] = Vector2.new(0.5, 0.5);
  124.     Library.Tree["c"]["Image"] = [[rbxassetid://5587865193]];
  125.     Library.Tree["c"]["Size"] = UDim2.new(0.3446066677570343, 0, 1.2999999523162842, 0);
  126.     Library.Tree["c"]["ClipsDescendants"] = true;
  127.     Library.Tree["c"]["Name"] = [[Image]];
  128.     Library.Tree["c"]["BackgroundTransparency"] = 1;
  129.     Library.Tree["c"]["Position"] = UDim2.new(-0.12022000551223755, 0, 0.5098040103912354, 0);
  130.    
  131.     local noti = Library.Tree["4"]
  132.     local holder = Library.Tree["2"]
  133.  
  134.     local NotificationsGui = holder
  135.     local newNotify = noti:Clone()
  136.         newNotify.Title.Text = title
  137.         newNotify.Message.Text = text
  138.         newNotify.Parent = NotificationsGui
  139.         newNotify.Visible = true
  140.         newNotify.Shadow.Image:TweenSize(UDim2.new(0, 530, 0, 150), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, .5)
  141.         coroutine.wrap(function()
  142.         task.wait(timer)
  143.         newNotify:Destroy()
  144.     end)()
  145. end
  146.  
  147. return Library
  148.  
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement