0% found this document useful (0 votes)
5 views4 pages

Roblox Player Profile UI Script

The script manages a player profile interface in a game, utilizing services like UserInputService and TweenService to create and display player profiles. It includes functionality to show special indicators for creators, premium members, and friends, as well as dynamically updating player stats. The interface can be toggled using the Tab key, and profiles are created or removed based on player events from the server.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Roblox Player Profile UI Script

The script manages a player profile interface in a game, utilizing services like UserInputService and TweenService to create and display player profiles. It includes functionality to show special indicators for creators, premium members, and friends, as well as dynamically updating player stats. The interface can be toggled using the Tab key, and profiles are created or removed based on player events from the server.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

local UserInputService = game:GetService("UserInputService")

local TweenService = game:GetService("TweenService")


local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")

local LocalPlayer = [Link]

if [Link] then
return
end

local PlayerRequest = [Link]:WaitForChild("PlayerRequest")

local Frame = [Link]


local Shadow = [Link].Frame_ShadowPng

local UIScale = [Link]

local ScrollingFrame = [Link]


local Template = [Link]

local IsOpened = false

StarterGui:SetCoreGuiEnabled([Link], false)

local function CreateProfile(Player)


if not ScrollingFrame:FindFirstChild([Link]) then
local NewTemplate = Template:Clone()
[Link] = [Link]

local function SpecialPlayer()


local Result = ""

if [Link] == [Link] and [Link] ==


[Link] then
Result = Result .. `<font
size="{[Link]([Link] + 4, 8)}" color="rgb(255, 228,
25)">★</font>`
end

if [Link] == [Link] then


Result = Result .. `<font
size="{[Link]([Link] + 4, 8)}" color="rgb(70, 141,
255)">★</font>`
end

if LocalPlayer:IsFriendsWith([Link]) then
Result = Result .. `<font
size="{[Link]([Link] + 4, 8)}">★</font>`
end

return Result
end

if [Link] ~= [Link] then


[Link] = `{SpecialPlayer()} {[Link]}\
n<font size="{tostring([Link]([Link] - 2, 2))}"
color="rgb(165, 165, 165)">@{[Link]}</font>`
else
[Link] = `{SpecialPlayer()} @{[Link]}`
end

local Thumbnail, IsReady = Players:GetUserThumbnailAsync([Link],


[Link], [Link].Size420x420)

[Link] = Thumbnail

local Leaderstats = Player:FindFirstChild("leaderstats")

if Leaderstats then
local Cycle = 0

for _, Element in pairs(Leaderstats:GetChildren()) do


if Element:IsA("ValueBase") then
Cycle += 1

local NewRank = [Link]:Clone()


[Link] = [Link]
[Link] = true
[Link] = NewTemplate

local function Update()


TweenService:Create(NewRank, [Link](.15,
[Link], [Link]), {
TextTransparency = 1
}):Play()

[Link](.15)

local ElementContext = [Link]

if typeof(ElementContext) ~= "string" then


ElementContext = tostring(ElementContext)

local ContextLength =
[Link](ElementContext)

ElementContext =
if ContextLength < 4 then
ElementContext
elseif ContextLength == 4 then
[Link](ElementContext, 1, 1) .. "," .. [Link](ElementContext, 2, 4)
elseif ContextLength == 5 then
[Link](ElementContext, 1, 2) .. "," .. [Link](ElementContext, 3, 5)
elseif ContextLength == 6 then
[Link](ElementContext, 1, 3) .. "," .. [Link](ElementContext, 4, 6)
elseif ContextLength == 7 then
[Link](ElementContext, 1, 1) .. "," .. [Link](ElementContext, 2, 4) ..
"," .. [Link](ElementContext, 5, 7)
elseif ContextLength == 8 then
[Link](ElementContext, 1, 2) .. "," .. [Link](ElementContext, 3, 5) ..
"," .. [Link](ElementContext, 6, 8)
elseif ContextLength == 9 then
[Link](ElementContext, 1, 3) .. "," .. [Link](ElementContext, 4, 6) ..
"," .. [Link](ElementContext, 7, 9)
elseif ContextLength == 10 then
[Link](ElementContext, 1, 1) .. "," .. [Link](ElementContext, 2, 4) ..
"," .. [Link](ElementContext, 5, 7) .. "," .. [Link](ElementContext, 8, 10)
elseif ContextLength == 11 then
[Link](ElementContext, 1, 2) .. "," .. [Link](ElementContext, 3, 5) ..
"," .. [Link](ElementContext, 6, 8) .. "," .. [Link](ElementContext, 9, 11)
elseif ContextLength == 12 then
[Link](ElementContext, 1, 3) .. "," .. [Link](ElementContext, 4, 6) ..
"," .. [Link](ElementContext, 7, 9) .. "," .. [Link](ElementContext, 10,
12)
else ElementContext
end

[Link] = `<b><font
size="{tostring([Link]([Link] - 2,
2))}">{[Link]}:</font></b>\n{ElementContext}`

TweenService:Create(NewRank, [Link](.15,
[Link], [Link]), {
TextTransparency = 0
}):Play()
end

Update()

[Link]:Connect(Update)

if Cycle >= 3 then


break
end
end
end
end

[Link] = true

[Link] = ScrollingFrame
end
end

for _, Player in ipairs(Players:GetPlayers()) do


CreateProfile(Player)
end

[Link]:Connect(function(Player, RequestType)
if RequestType == "Added" then
CreateProfile(Player)
else
local Profile = ScrollingFrame:FindFirstChild([Link])

if Profile then
Profile:Destroy()
end
end
end)

[Link]:Connect(function(input)
if [Link] == [Link] then
if IsOpened then
IsOpened = false

TweenService:Create(UIScale, [Link](.3,
[Link], [Link]), {
Scale = 0
}):Play()

[Link]()

[Link], [Link] = false, false


else
IsOpened = true

TweenService:Create(UIScale, [Link](.3,
[Link], [Link]), {
Scale = 1
}):Play()

[Link]()

[Link], [Link] = true, true


end
end
end)

You might also like