Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local players = game:GetService('Players')
- local tweenService = game:GetService('TweenService')
- local runService = game:GetService('RunService')
- local coreGui = game:GetService('CoreGui')
- local Library = {}
- Library.Tree = {}
- function Library:Notification(title, text, timer)
- Library.Tree["1"] = Instance.new("ScreenGui", runService:IsStudio() and players.LocalPlayer:WaitForChild("PlayerGui") or coreGui);
- Library.Tree["1"]["IgnoreGuiInset"] = false;
- Library.Tree["1"]["ScreenInsets"] = Enum.ScreenInsets.DeviceSafeInsets;
- Library.Tree["1"]["Name"] = [[SolitudeNotification]];
- -- StarterGui.SolitudeNotification.Holder
- Library.Tree["2"] = Instance.new("Frame", Library.Tree["1"]);
- Library.Tree["2"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Tree["2"]["AnchorPoint"] = Vector2.new(1, 1);
- Library.Tree["2"]["BackgroundTransparency"] = 1;
- Library.Tree["2"]["Size"] = UDim2.new(0, 331, 0, 579);
- Library.Tree["2"]["ClipsDescendants"] = true;
- Library.Tree["2"]["Position"] = UDim2.new(0.9900000095367432, 0, 0.9919999837875366, 0);
- Library.Tree["2"]["Name"] = [[Holder]];
- -- StarterGui.SolitudeNotification.Holder.UIListLayout
- Library.Tree["d"] = Instance.new("UIListLayout", Library.Tree["2"]);
- Library.Tree["d"]["VerticalAlignment"] = Enum.VerticalAlignment.Bottom;
- Library.Tree["d"]["HorizontalAlignment"] = Enum.HorizontalAlignment.Right;
- Library.Tree["d"]["Padding"] = UDim.new(0, 10);
- Library.Tree["d"]["SortOrder"] = Enum.SortOrder.LayoutOrder;
- -- StarterGui.SolitudeNotification.NoitificationBase
- Library.Tree["4"] = Instance.new("Frame", Library.Tree["1"]);
- Library.Tree["4"]["BackgroundColor3"] = Color3.fromRGB(21, 21, 21);
- Library.Tree["4"]["Size"] = UDim2.new(0, 300, 0, 81);
- Library.Tree["4"]["ClipsDescendants"] = true;
- Library.Tree["4"]["BorderColor3"] = Color3.fromRGB(21, 21, 21);
- Library.Tree["4"]["Position"] = UDim2.new(0.006228327751159668, 0, 0.8910430669784546, 0);
- Library.Tree["4"]["Visible"] = false;
- Library.Tree["4"]["Name"] = [[NoitificationBase]];
- -- StarterGui.SolitudeNotification.NoitificationBase.UICorner
- Library.Tree["5"] = Instance.new("UICorner", Library.Tree["4"]);
- Library.Tree["5"]["CornerRadius"] = UDim.new(0, 5);
- -- StarterGui.SolitudeNotification.NoitificationBase.Title
- Library.Tree["6"] = Instance.new("TextLabel", Library.Tree["4"]);
- Library.Tree["6"]["TextWrapped"] = true;
- Library.Tree["6"]["TextTruncate"] = Enum.TextTruncate.AtEnd;
- Library.Tree["6"]["TextScaled"] = true;
- Library.Tree["6"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Tree["6"]["TextXAlignment"] = Enum.TextXAlignment.Left;
- Library.Tree["6"]["FontFace"] = Font.new([[rbxasset://fonts/families/GothamSSm.json]], Enum.FontWeight.Heavy, Enum.FontStyle.Normal);
- Library.Tree["6"]["TextSize"] = 14;
- Library.Tree["6"]["TextColor3"] = Color3.fromRGB(244, 245, 245);
- Library.Tree["6"]["Size"] = UDim2.new(0, 241, 0, 20);
- Library.Tree["6"]["ClipsDescendants"] = true;
- Library.Tree["6"]["Text"] = [[Matt sent you a friend request]];
- Library.Tree["6"]["Name"] = [[Title]];
- Library.Tree["6"]["BackgroundTransparency"] = 1.940000057220459;
- Library.Tree["6"]["Position"] = UDim2.new(0.10828572511672974, 0, 0.16298647224903107, 0);
- -- StarterGui.SolitudeNotification.NoitificationBase.Message
- Library.Tree["7"] = Instance.new("TextLabel", Library.Tree["4"]);
- Library.Tree["7"]["TextWrapped"] = true;
- Library.Tree["7"]["TextYAlignment"] = Enum.TextYAlignment.Top;
- Library.Tree["7"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Tree["7"]["TextXAlignment"] = Enum.TextXAlignment.Left;
- Library.Tree["7"]["FontFace"] = Font.new([[rbxasset://fonts/families/GothamSSm.json]], Enum.FontWeight.Medium, Enum.FontStyle.Normal);
- Library.Tree["7"]["TextSize"] = 14;
- Library.Tree["7"]["TextColor3"] = Color3.fromRGB(244, 245, 245);
- Library.Tree["7"]["Size"] = UDim2.new(0, 262, 0, 38);
- Library.Tree["7"]["ClipsDescendants"] = true;
- Library.Tree["7"]["Text"] = [[Hey, wanna dress up as wizards and ride around on hoverboards?]];
- Library.Tree["7"]["Name"] = [[Message]];
- Library.Tree["7"]["BackgroundTransparency"] = 1.940000057220459;
- Library.Tree["7"]["Position"] = UDim2.new(0.03828572481870651, 0, 0.4393506348133087, 0);
- -- StarterGui.SolitudeNotification.NoitificationBase.icon
- Library.Tree["8"] = Instance.new("ImageLabel", Library.Tree["4"]);
- Library.Tree["8"]["ScaleType"] = Enum.ScaleType.Fit;
- Library.Tree["8"]["BackgroundColor3"] = Color3.fromRGB(35, 37, 51);
- Library.Tree["8"]["Image"] = [[rbxassetid://3944670656]];
- Library.Tree["8"]["Size"] = UDim2.new(0, 15, 0, 15);
- Library.Tree["8"]["BorderColor3"] = Color3.fromRGB(35, 37, 51);
- Library.Tree["8"]["Name"] = [[icon]];
- Library.Tree["8"]["BackgroundTransparency"] = 1;
- Library.Tree["8"]["Position"] = UDim2.new(0.038285721093416214, 0, 0.18593530356884003, 0);
- -- StarterGui.SolitudeNotification.NoitificationBase.ImageButton
- Library.Tree["9"] = Instance.new("ImageButton", Library.Tree["4"]);
- Library.Tree["9"]["ScaleType"] = Enum.ScaleType.Fit;
- Library.Tree["9"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Tree["9"]["ImageColor3"] = Color3.fromRGB(113, 116, 121);
- Library.Tree["9"]["Image"] = [[rbxassetid://3944676352]];
- Library.Tree["9"]["Size"] = UDim2.new(0, 15, 0, 15);
- Library.Tree["9"]["Position"] = UDim2.new(0.9133332967758179, 0, 0.1917283833026886, 0);
- Library.Tree["9"]["BackgroundTransparency"] = 1;
- -- StarterGui.SolitudeNotification.NoitificationBase.UIStroke
- Library.Tree["a"] = Instance.new("UIStroke", Library.Tree["4"]);
- Library.Tree["a"]["Color"] = Color3.fromRGB(26, 26, 26);
- Library.Tree["a"]["Thickness"] = 2;
- -- StarterGui.SolitudeNotification.NoitificationBase.Shadow
- Library.Tree["b"] = Instance.new("Frame", Library.Tree["4"]);
- Library.Tree["b"]["ZIndex"] = 0;
- Library.Tree["b"]["BorderSizePixel"] = 0;
- Library.Tree["b"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Tree["b"]["AnchorPoint"] = Vector2.new(0.5, 0.5);
- Library.Tree["b"]["BackgroundTransparency"] = 1;
- Library.Tree["b"]["Size"] = UDim2.new(1.003333330154419, 35, 1, 35);
- Library.Tree["b"]["Position"] = UDim2.new(0.5016666650772095, 0, 0.5, 0);
- Library.Tree["b"]["Name"] = [[Shadow]];
- -- StarterGui.SolitudeNotification.NoitificationBase.Shadow.Image
- Library.Tree["c"] = Instance.new("ImageLabel", Library.Tree["b"]);
- Library.Tree["c"]["BorderSizePixel"] = 0;
- Library.Tree["c"]["ScaleType"] = Enum.ScaleType.Crop;
- Library.Tree["c"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- Library.Tree["c"]["ImageColor3"] = Color3.fromRGB(25, 5, 12);
- Library.Tree["c"]["ImageTransparency"] = 0.5299999713897705;
- Library.Tree["c"]["AnchorPoint"] = Vector2.new(0.5, 0.5);
- Library.Tree["c"]["Image"] = [[rbxassetid://5587865193]];
- Library.Tree["c"]["Size"] = UDim2.new(0.3446066677570343, 0, 1.2999999523162842, 0);
- Library.Tree["c"]["ClipsDescendants"] = true;
- Library.Tree["c"]["Name"] = [[Image]];
- Library.Tree["c"]["BackgroundTransparency"] = 1;
- Library.Tree["c"]["Position"] = UDim2.new(-0.12022000551223755, 0, 0.5098040103912354, 0);
- local noti = Library.Tree["4"]
- local holder = Library.Tree["2"]
- local NotificationsGui = holder
- local newNotify = noti:Clone()
- newNotify.Title.Text = title
- newNotify.Message.Text = text
- newNotify.Parent = NotificationsGui
- newNotify.Visible = true
- newNotify.Shadow.Image:TweenSize(UDim2.new(0, 530, 0, 150), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, .5)
- coroutine.wrap(function()
- task.wait(timer)
- newNotify:Destroy()
- end)()
- end
- return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement