Hello I’m working on a game that I haven’t touched in a while and I’m redoing the entire code. I just finished this script and wanted feedback if theres anything to improve since I used to have it all into multiple other local scripts
Code:
local UIShelf = require(game:GetService("ReplicatedStorage").UIShelf)
local LP = game.Players.LocalPlayer
local function IconCreation(Name, IamgeId)
local icon = UIShelf.CreateIcon({
Name = Name,
Image = IamgeId,
Order = 1,
Area = UIShelf.HorizontalAlignment.Left,
})
end
IconCreation("Spectate", 3926307971)
IconCreation("Rebirths", 3926305904)
IconCreation("Custom_Gui", 3926307971)
local function IconOffset(Name, x1, x2, y1, y2)
LP.PlayerGui.TopBarApp.TopBarFrame.LeftFrame[Name].Background.Icon.ImageRectSize = Vector2.new(x1,y1)
LP.PlayerGui.TopBarApp.TopBarFrame.LeftFrame[Name].Background.Icon.ImageRectOffset = Vector2.new(x2,y2)
end