[RoLead] Check out my new UI Module Project!

RoLead is purely being created for things such as pop-up confirmations and premade UI elements that can be customized with more ease than you would find with Instance.new()

The module:

local RoLead = {}

function RoLead.ScreenGui(Parent, Name, IgnoreGuiInset, ResetOnSpawn)
	local ScreenGui = Instance.new("ScreenGui", Parent)
	ScreenGui.Name = Name
	if IgnoreGuiInset then
		if IgnoreGuiInset == true then
			ScreenGui.IgnoreGuiInset = true
		else
			ScreenGui.IgnoreGuiInset = false
		end
	end
	if ResetOnSpawn then
		if ResetOnSpawn == true then
			ScreenGui.ResetOnSpawn = true
		else
			ScreenGui.ResetOnSpawn = false
		end
	end
end

function RoLead.PopUpFrame(Parent, Name, Color, UICorner, TitleText, TitleTextColor, DescriptionText, DescriptionTextColor, ButtonText, ButtonColor)
	local Frame = Instance.new("Frame", Parent)
	Frame.Name = Name
	Frame.Size = UDim2.fromScale(.214,.34)
	Frame.Position = UDim2.fromScale(.5,.5)
	Frame.AnchorPoint = Vector2.new(.5,.5)
	Frame.BackgroundColor3 = Color
	local Stroke = Instance.new("UIStroke", Frame)
	Stroke.Color = Color3.fromRGB(141, 141, 141)
	Stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
	Stroke.Thickness = 2
	if UICorner then
		if UICorner == true then
			local A_1 = Instance.new("UICorner", Frame)
			A_1.CornerRadius = UDim.new(.05, 0)
		end
	end
	if TitleText then
		local A_1 = Instance.new("TextLabel", Frame)
		A_1.Name = "Title"
		A_1.Size = UDim2.fromScale(.919,.132)
		A_1.Position = UDim2.fromScale(.037,.025)
		A_1.TextScaled = true
		A_1.Font = Enum.Font.SourceSansBold
		A_1.BackgroundTransparency = 1
		A_1.TextColor3 = TitleTextColor
		A_1.Text = TitleText
	end
	if DescriptionText then
		local A_1 = Instance.new("TextLabel", Frame)
		A_1.Name = "Description"
		A_1.Size = UDim2.fromScale(.919,.555)
		A_1.Position = UDim2.fromScale(.037,.188)
		A_1.TextScaled = true
		A_1.Font = Enum.Font.SourceSansBold
		A_1.BackgroundTransparency = 1
		A_1.TextColor3 = DescriptionTextColor
		A_1.Text = DescriptionText
	end
	if ButtonText then
		local A_1 = Instance.new("TextButton", Frame)
		A_1.Name = "Button"
		A_1.Size = UDim2.fromScale(.919,.132)
		A_1.Position = UDim2.fromScale(.04,.812)
		A_1.TextScaled = true
		A_1.Font = Enum.Font.SourceSansBold
		A_1.BackgroundColor3 = ButtonColor
		A_1.TextColor3 = Color
		A_1.Text = ButtonText
		local A_2 = Instance.new("UICorner", A_1)
		A_2.CornerRadius = UDim.new(.2,0)
		local A_3 = Instance.new("UIStroke", A_1)
		A_3.Color = Color3.fromRGB(141, 141, 141)
		A_3.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
		A_3.Thickness = 2
		A_1.MouseButton1Click:Connect(function()
			Frame:TweenSize(UDim2.fromScale(.214,.061), 0, 0, .5)
			Frame:WaitForChild("Description", 5).Visible = false
			A_1.Visible = false
			Frame:WaitForChild("Title", 5).Visible = false
			task.wait(1)
			Frame:WaitForChild("Title", 5).Visible = true
			Frame:WaitForChild("Title", 5).Size = UDim2.fromScale(.919,.975)
			Frame:WaitForChild("Title", 5).Position = UDim2.fromScale(.037,.025)
			Frame:WaitForChild("Title", 5).Text = "Thanks!"
			Frame:TweenPosition(UDim2.fromScale(-1,.5), 0, 2, 2)
			task.wait(5)
			Frame:Destroy()
		end)
	end
end

return RoLead

Along with the module, I have provided a script that parents the module with its description and example code:

--[[

β–ˆβ–€β–ˆ β–ˆβ–€β–ˆ β–ˆβ–‘β–‘ β–ˆβ–€β–€ β–„β–€β–ˆ β–ˆβ–€β–„
β–ˆβ–€β–„ β–ˆβ–„β–ˆ β–ˆβ–„β–„ β–ˆβ–ˆβ–„ β–ˆβ–€β–ˆ β–ˆβ–„β–€

This script is used to create your UI elements, or to be an example on how to use it.

In order to reference things in the UI make sure that you remember and reference their direct path! I recommend creating the UIElements and then defining them! (as seen starting at line 25)

Current functions and Args:
1. ScreenGui      [Args: Parent, Name, IgnoreGuiInset, ResetOnSpawn]
2. PopUpFrame	  [Args: Parent, Name, Color, UICorner, TitleText, TitleTextColor, DescriptionText, DescriptionTextColor, ButtonText, ButtonColor]

]]--

local RoLead = require(script.Functions)

--[[--------------------------------]]--

game.Players.PlayerAdded:Connect(function(Player)
	repeat task.wait() until Player.CharacterAdded
	RoLead.ScreenGui(Player.PlayerGui, "RoLead", true, false)
	RoLead.PopUpFrame(Player.PlayerGui:WaitForChild("RoLead", 5), "MainFrame", Color3.fromRGB(255,85,20), true, "Welcome!", Color3.fromRGB(255,255,255), "Please make sure that you enjoy yourself! Don't forget to check out our other games and socials!", Color3.fromRGB(220,255,255), "Will do!", Color3.fromRGB(0,255,100))
	
	local RoLead = Player.PlayerGui:WaitForChild("RoLead", 5)
	local MainFrame = RoLead:WaitForChild("MainFrame", 5)
end)

Proper placement looks like this:

image

An example of the custom pre-made GUI’s I plan on creating:

image

This also includes pre-programmed closing buttons and animations upon clicking them!
Keep in mind, this is still a work-in-progress and I plan on updating this a ton!

this is pretty cool, not using it tho if you don’t add like 100000 features for customization (like being able to add instances such as gradients and corners)

1 Like

Thanks for the feedback, I will see what I can do!

oh also you should use debris for this instead
image