So, I kinda got bored and made this. What it does is: It lets you alert the users and prompt the users for a y/n answer. It uses the same UI that the Roblox Kick prompt does.
LINK:
Features:
Alert players with important messages using the Roblox UI prompt.
Prompt players for confirmation before performing critical actions.
Customize the prompt message and appearance to suit your game’s style.
Here’s an example of how you can use New-Alerts:
local alrt = require(script.Parent:WaitForChild("Ro-Alerts"))
---
--ALERT module.Alert(player,title,body,button)
alrt.Alert(game.Players:WaitForChild("sharklier"),"TITLE","HELLO! THIS IS THE BODY TEXT!","PRESS ME!")
---
--CONFIRM module.Conf(player,Title,Body,Button1,Button2)
local x = alrt.Conf(game.Players:WaitForChild("sharklier"),"TITLE","would you like to confirm?", "yes","no") -- if yes is pressed then x returns 1, if no is pressed the x returns 2
It’s a server script or local script. You can put it anywhere but, make sure if your using a local script put the module somewhere compatible with local scripts. EDIT:
Also, Confirms sadly don’t work if its not being required by a local script since the confirm runs on a remote event.
Great module, btw you should add a secondary button
Primary one is the one whose background is filled with white (the one you used), meanwhile the secondary button is the one with transparent background and with white outline.
Also can you make it so you can only put text and not button?
This is an absolutely incredible module. I have on question about this tho: How can I get the callbacks and do actions based around it? E.g if yes is pressed, it does something which i can customize