-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathNotification_Library.lua
More file actions
72 lines (64 loc) · 2.62 KB
/
Notification_Library.lua
File metadata and controls
72 lines (64 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-- thanks Abyss C: --
local NotificationLibrary = {}
local AbyssGUI = Instance.new("ScreenGui"); AbyssGUI.Name = "Abyss"; AbyssGUI.Parent = game.CoreGui; AbyssGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
function NotificationLibrary:Notify(TitleText, Desc, Delay)
local Notification = Instance.new("Frame")
local Line = Instance.new("Frame")
local Warning = Instance.new("ImageLabel")
local UICorner = Instance.new("UICorner")
local Title = Instance.new("TextLabel")
local Description = Instance.new("TextLabel")
Notification.Name = "Notification"
Notification.Parent = AbyssGUI
Notification.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Notification.BackgroundTransparency = 0.400
Notification.BorderSizePixel = 0
Notification.Position = UDim2.new(1, 5, 0, 75)
Notification.Size = UDim2.new(0, 450, 0, 60)
Line.Name = "Line"
Line.Parent = Notification
Line.BackgroundColor3 = Color3.fromRGB(241, 196, 15)
Line.BorderSizePixel = 0
Line.Position = UDim2.new(0, 0, 0.938461304, 0)
Line.Size = UDim2.new(0, 0, 0, 4)
Warning.Name = "Warning"
Warning.Parent = Notification
Warning.BackgroundTransparency = 1.000
Warning.Position = UDim2.new(0.0258302614, 0, 0.0897435844, 0)
Warning.Size = UDim2.new(0, 44, 0, 49)
Warning.Image = "rbxassetid://3944668821"
Warning.ImageColor3 = Color3.fromRGB(241, 196, 15)
Warning.ScaleType = Enum.ScaleType.Fit
UICorner.CornerRadius = UDim.new(0, 20)
UICorner.Parent = Warning
Title.Name = "Title"
Title.Parent = Notification
Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Title.BackgroundTransparency = 1.000
Title.Position = UDim2.new(0.161, 0, 0.155, 0)
Title.Size = UDim2.new(0, 205, 0, 15)
Title.Text = TitleText
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.TextSize = 12.000
Title.TextStrokeTransparency = 0.500
Title.TextXAlignment = Enum.TextXAlignment.Left
Description.Name = "Description"
Description.Parent = Notification
Description.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Description.BackgroundTransparency = 1.000
Description.Position = UDim2.new(0.161, 0, 0.483, 0)
Description.Size = UDim2.new(0, 205, 0, 18)
Description.Text = Desc
Description.TextColor3 = Color3.fromRGB(199, 199, 199)
Description.TextSize = 12.000
Description.TextStrokeTransparency = 0.500
Description.TextXAlignment = Enum.TextXAlignment.Left
Notification:TweenPosition(UDim2.new(1, -400, 0, 75), "Out", "Sine", 0.35)
wait(0.35)
Line:TweenSize(UDim2.new(0, 450, 0, 4), "Out", "Linear", Delay)
wait(Delay)
Notification:TweenPosition(UDim2.new(1, 5, 0, 75), "Out", "Sine", 0.35)
wait(0.35)
Notification:Destroy()
end
return NotificationLibrary