WARNING
Please don’t use this module. It module was created when I knew almost nothing about scripting. I might remake it in the future, and if I will, the next version of the module won’t be backwards compatible with this one. Using the module in its current state is not recommended at all.
Original topic
About
NotificationStyle is simple-to-use notifications module I made quite some time ago
It’s pretty much something that I made for practice
Parameters
Player: Player -- can be nil if running on client --
Configuration: table
Configuration
Style: string (if nil: "Modern");
Duration: number (if nil: 5)
Sound: string or number (if nil: "Pop");
Title: string or number (if nil: "Notification");
Text: string or number (if nil: "Text was not found");
Icon: string or number (if nil: "Exclamation");
FadeInTweenInfo: TweenInfo (if nil: replacement_FadeInTweenInfo),
FadeOutTweenInfo: TweenInfo (if nil: replacement_FadeOutTweenInfo),
Usage
Lets think that NotificationStyle is located inside ReplicatedStorage
require(game.ReplicatedStorage.NotificationStyle)(game.Players.LocalPlayer --[[ or nil if running on client ]], {
Style = "Compact",
Timeout = 10,
Sound = "Badge", -- supports numbers and "rbxassetid://number"
Title = "Example",
Text = "The FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly, but gets faster each minute after you hear this signal. [beep] A single lap should be completed each time you hear this sound. [ding] Remember to run in a straight line, and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark, get ready, start.",
Icon = nil,
--[[ Honestly who will be using these two
FadeInTweenInfo = nil,
FadeOutTweenInfo = nil,
]]--
})
--// "Player" parameter is required to run the module on server (pls dont) //--
require(game.ReplicatedStorage.NotificationStyle)(game.Players.LocalPlayer)
--// "Player" parameter is not required to run the module on client (pls do) //--
require(game.ReplicatedStorage.NotificationStyle)()
Custom Styles
NotificationStyle comes with 5 preset styles.
However, they will not fit with a big chunk of games. It’s not a big deal to make a style, but keep these 2 things in mind:
-
Icon, Text and Title must always be a child of style frame. If you will be making some sort of image based background, make sure that the style itself is always a Frame.
-
If you want smaller or bigger devices to support the system, make sure that size of everything is set to Scale
Download
File: NotificationStyle.rbxm (13.9 KB)
Model: https://www.roblox.com/library/8244302362
Hope y’all will find this useful!