Skip to content

A Luau module for creating and displaying custom message box types.

License

Notifications You must be signed in to change notification settings

bendaws/messagebox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

MessageBox

This module lets you manage and display custom message boxes in Roblox Luau. It is type-checked and contains these types:

  • MessageBox: for creating and displaying MessageBoxes
  • MessageBoxButton: for displaying buttons with functions on a message box.

Code Sample

Here is some basic usage of the MessageBox type.

local MessageBoxManager = require(game.ReplicatedStorage.MessageBox)

local NewMessageBox = MessageBoxManager.New() -- creates a new MessageBox
local LocalPlayer = game:GetService("Players").LocalPlayer

NewMessageBox.Title = "Hello world!"
NewMessageBox.Content = "This is my first message box." -- Note: the default box supports rich text

local MessageBoxOKButton: MessageBoxManager.MessageBoxButton = {
	Label = "OK",
	Callback = NewMessageBox.Hide,
}

NewMessageBox.Show(LocalPlayer)
-- The OK button in this example hides the message box, but you can also do this:
-- NewMessageBox.Hide()

Result