How can I make something like this?

how can I make something like this?
these are all the scripts I have

and: – Define services
local Players = game:GetService(“Players”)
local TeleportService = game:GetService(“TeleportService”)
local RunService = game:GetService(“RunService”)
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)

– Get local player and UI elements
local localPlayer = Players.LocalPlayer
local playerGui = localPlayer:WaitForChild(“PlayerGui”, 20)
local ui = playerGui:WaitForChild(“UI”, 20)

– Set up initial values
local settings = {
Booleans = {
Transition = false,
Open = false,
},
Dimensions = {
X_OS = 0.14,
X_I = 0.24,
Y_OS = 0.8,
Y_I = 1.2,
},
universes = {},
OgSize = ui.Button.Size.X.Scale
}

– Function to open/close games UI
local function openGames()
if settings.Booleans.Transition then return end

settings.Booleans.Transition = true
script.Button:Play()

settings.Booleans.Open = not settings.Booleans.Open

if settings.Booleans.Open then
	ui.GamesFrame.Visible = true
	ui.GamesFrame:TweenSize(
		UDim2.fromScale(0.6, 0.6),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Bounce,
		0.5
	)
else
	ui.GamesFrame:TweenSize(
		UDim2.new(),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Bounce,
		0.5
	)
end

task.wait(0.5)

if not settings.Booleans.Open then
	ui.GamesFrame.Visible = false
end

settings.Booleans.Transition = false

end

– Get more games instances
local moreGamesInstances = ReplicatedStorage:WaitForChild(“MoreGamesInstances”, 20)
for _, instance in pairs(moreGamesInstances:GetChildren()) do
if instance.Value ~= game.PlaceId then
table.insert(settings.universes, {instance.Name, instance.Value})
end
end

table.sort(settings.universes, function(a, b)
local aOrder = ReplicatedStorage.MoreGamesInstances[a[1]]:GetAttribute(“Order”) or 0
local bOrder = ReplicatedStorage.MoreGamesInstances[b[1]]:GetAttribute(“Order”) or 0
return aOrder < bOrder
end)

– UI interactions
ui.Button.MouseEnter:Connect(function()
ui.Button:TweenSize(
UDim2.new(settings.OgSize * 1.1, 0, settings.OgSize * 1.1, 0),
“InOut”,
“Sine”,
0.05
)
script.Button_hover:Play()
end)

ui.Button.MouseLeave:Connect(function()
ui.Button:TweenSize(
UDim2.new(settings.OgSize, 0, settings.OgSize, 0),
“InOut”,
“Sine”,
0.05,
true
)
end)

ui.Button.Activated:Connect(openGames)
ui.GamesFrame.CloseButton.Activated:Connect(openGames)

– Populate games frame
local rows = math.ceil(#settings.universes / 3)
ui.GamesFrame.Buttons.CanvasSize = UDim2.new(0, 0, rows / 3, 0)

for i, universe in ipairs(settings.universes) do
if game.PlaceId ~= universe[2] then
local buttonClone = script.UniverseButton:Clone()
buttonClone.Parent = ui.GamesFrame.Buttons
buttonClone.Name = universe[1]
buttonClone.Position = UDim2.new(
settings.Dimensions.X_OS + (i - 1) % 4 * settings.Dimensions.X_I,
0,
settings.Dimensions.Y_OS / rows + math.floor((i - 1) / 4) * settings.Dimensions.Y_I / rows,
0
)
buttonClone.Size = UDim2.new(0.96 / rows, 0, 0.96 / rows, 0)
buttonClone.Image = “rbxthumb://type=GameIcon&id=” … universe[2] … “&w=150&h=150”

	buttonClone.Activated:Connect(function()
		TeleportService:Teleport(universe[2], localPlayer)
		script.Button:Play()
	end)
end

end

– Heartbeat event to change button color
RunService.Heartbeat:Connect(function()
local title = ui:FindFirstChild(“UniverseButton”)
if title then
title.Title.TextColor3 = Color3.fromHSV(tick() % 5 / 5, 0.7, 1)
end
end)

– Return a value to indicate the module loaded successfully
return true


Screenshot 2024-09-01 at 8.38.48 PM

or if anyone has something similar to this and is willing to let me use it then I’d appreciate it

1 Like