From b641829561442d6f6cc369116df12df2b25b0d6d Mon Sep 17 00:00:00 2001 From: Thomas G <62822072+Thomasluigi07@users.noreply.github.com> Date: Tue, 12 Jul 2022 23:03:37 +1000 Subject: [PATCH] added proper admin icon support --- public/asset/11 | 50 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/public/asset/11 b/public/asset/11 index 259f1ec..72beda7 100644 --- a/public/asset/11 +++ b/public/asset/11 @@ -22,6 +22,25 @@ local bigEasingStyle = Enum.EasingStyle.Back local smallEasingStyle = Enum.EasingStyle.Quart local lightBackground = true +local adminUserNames = { + "ARCHBLOX", + "Thomas", + "Conkley", + "Josh", + "BagOfDreams", + "templater", + "AliMine8555", + "Mura", + "rec01n", + "zombieboy667", + "Penguin", + "cott", + "SQL", + "MORBLOX", + "Stick", + "sodium", +} + local function waitForChild(instance, name) while not instance:FindFirstChild(name) do instance.ChildAdded:wait() @@ -679,10 +698,13 @@ if UserSettings and LoadLibrary then end end - local function getMembershipTypeIcon(membershipType,name) - if name == "Thomas" then - return "rbxasset://textures/ui/TinyAdminIcon.png" - elseif membershipType == Enum.MembershipType.None then + local function getIconForPlayer(membershipType,name) + for i,v in ipairs(adminUserNames) do + if v == name then + return "rbxasset://textures/ui/TinyAdminIcon.png" + end + end + if membershipType == Enum.MembershipType.None then return "" elseif membershipType == Enum.MembershipType.BuildersClub then return "rbxasset://textures/ui/TinyBcIcon.png" @@ -700,11 +722,11 @@ if UserSettings and LoadLibrary then local fontHeight = 20 local friendIconImage = getFriendStatusIcon(friendStatus) - nameObject.MembershipTypeLabel.FriendStatusLabel.Visible = (friendIconImage ~= nil) + nameObject.UserIconLabel.FriendStatusLabel.Visible = (friendIconImage ~= nil) if friendIconImage ~= nil then --Show friend icon - nameObject.MembershipTypeLabel.FriendStatusLabel.Image = friendIconImage + nameObject.UserIconLabel.FriendStatusLabel.Image = friendIconImage nameObject.NameLabel.Position =UDim2.new(0,2*fontHeight,0,1) nameObject.NameLabel.Size = UDim2.new(1,-2*fontHeight,1,-2) else @@ -717,7 +739,7 @@ if UserSettings and LoadLibrary then local fontHeight = 20 nameObject.Size = UDim2.new(1,0,0,fontHeight) - nameObject.MembershipTypeLabel.Image = getMembershipTypeIcon(membershipStatus,nameObject.NameLabel.Text) + nameObject.UserIconLabel.Image = getIconForPlayer(membershipStatus,nameObject.NameLabel.Text) end @@ -748,13 +770,13 @@ if UserSettings and LoadLibrary then frame.BackgroundTransparency = 0.5 frame.BorderSizePixel = 0 - local membershipStatusLabel = Instance.new("ImageLabel") - membershipStatusLabel.Name = "MembershipTypeLabel" - membershipStatusLabel.BackgroundTransparency = 1 - membershipStatusLabel.Size = UDim2.new(1,0,1,0) - membershipStatusLabel.Position = UDim2.new(0,0,0,0) - membershipStatusLabel.SizeConstraint = Enum.SizeConstraint.RelativeYY - membershipStatusLabel.Parent = frame + local UserIconStatusLabel = Instance.new("ImageLabel") + UserIconStatusLabel.Name = "UserIconLabel" + UserIconStatusLabel.BackgroundTransparency = 1 + UserIconStatusLabel.Size = UDim2.new(1,0,1,0) + UserIconStatusLabel.Position = UDim2.new(0,0,0,0) + UserIconStatusLabel.SizeConstraint = Enum.SizeConstraint.RelativeYY + UserIconStatusLabel.Parent = frame local friendStatusLabel = Instance.new("ImageLabel") friendStatusLabel.Name = "FriendStatusLabel"