Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Global Directories ]]--
- local StarterGui = game:GetService('StarterGui')
- local ServerScriptService = game:GetService('ServerScriptService')
- local Script_MainSetup = workspace:WaitForChild('Script_MainSetup')
- local Game_MainStorage = Script_MainSetup:WaitForChild('Game_MainStorage')
- local Game_ModuleScripts = Game_MainStorage:WaitForChild('Game_ModuleScripts')
- local Game_Scripts = Game_MainStorage:WaitForChild('Game_Scripts')
- local Game_ScriptsAssets = Game_MainStorage:WaitForChild('Game_ScriptsAssets')
- local leaderstats = game.Players.LocalPlayer:WaitForChild('leaderstats')
- --[[ UI Globals ]]--
- local text_Color = Color3.fromRGB(62,66,76)
- local text_TitleTextSize = 32
- local text_DisplayTextSize = 25
- local text_IconTextSize = 25
- local text_TitleFont = Enum.Font.SourceSansBold
- local BackgroundColor1 = Color3.fromRGB(240,240,240)
- local BackgroundColor2 = Color3.fromRGB(255,255,255)
- local BackgroundColor3 = Color3.fromRGB(248,248,248)
- local Shown = {}
- local Hidden = {}
- local maintainDisplaylist = {}
- local maintainStatlist = {}
- for _,i in pairs(leaderstats:GetChildren()) do
- if i.Hidden.Value then
- table.insert(Hidden, i)
- else
- table.insert(Shown, i)
- end
- end
- function process(str)
- local output = "" --result
- local count = 0
- str = string.reverse(str) --reverses the string so that the , go in the correct place
- for i=1 , string.len(str) do --loop through all characters
- count = count + 1
- if count == 4 then --uses modulo which is the remainder from the division of i/4
- output = output .. "," .. string.sub(str, i, i) --adds in the , incuding the number
- count = 1
- else
- output = output .. string.sub(str, i, i) -- no , needed
- end
- end
- return string.reverse(output) --puts the string back to its correct format
- end
- function maintain(item, stat)
- if item.Text == (process(stat.Value)) then -- Makes sure the text is displaying the correct value
- return
- else
- item.Text = (process(stat.Value))
- end
- if item.Text == "inf" then
- item.Text = "Infinite"
- end
- end
- -- creat stat ui
- local queue = 0
- local stat_Gui = game.Players.LocalPlayer.PlayerGui:FindFirstChild('UI')
- local stat_Frame = Instance.new('Frame', stat_Gui:FindFirstChild('Frame_HUD'))
- stat_Frame.Name = 'Frame_Stats'
- stat_Frame.Position = UDim2.new(1, -205,0, 5)
- stat_Frame.Size = UDim2.new(0,200,0,(36 + (60 * #Shown) + 90))
- stat_Frame.BackgroundTransparency = 1
- stat_Frame.ZIndex = 7
- stat_Frame.ClipsDescendants = true
- local players_Frame = Instance.new('ScrollingFrame', stat_Gui:FindFirstChild('Frame_HUD'))
- players_Frame.Name = 'Frame_Players'
- --players_Frame.Position = UDim2.new(1, -205,0, 205)
- players_Frame.Size = UDim2.new(0,200,0,200)
- players_Frame.CanvasSize = UDim2.new(0,0,2,0)
- players_Frame.BackgroundTransparency = 1
- players_Frame.ZIndex = 7
- players_Frame.ClipsDescendants = true
- players_Frame.BorderSizePixel = 0
- players_Frame.ScrollBarThickness = 6
- for i=1 ,(#Shown) do
- queue = queue + 1
- local Frame = Instance.new('Frame', stat_Frame)
- Frame.BackgroundColor3 = BackgroundColor2
- Frame.BorderSizePixel = 0
- Frame.Name = ("Frame_Stat"..queue)
- Frame.Size = UDim2.new(1,0,0,60)
- Frame.Position = UDim2.new(0,0,0,36 + (60*(queue)- 60))
- Frame.ZIndex = 8
- local Shadow = Frame:Clone()
- Shadow.Parent = Frame
- Shadow.Name = 'Frame_Shadow'
- Shadow.Style = Enum.FrameStyle.DropShadow
- Shadow.Size = UDim2.new(1,6,1,6)
- Shadow.Position = UDim2.new(0,-3,0,-3)
- Shadow.ZIndex = 7
- local Title = Instance.new('TextLabel', Frame)
- Title.Name = 'Label_Name'
- Title.BackgroundColor3 = BackgroundColor1
- Title.BorderSizePixel = 0
- Title.Size = UDim2.new(1,0,.5,0)
- Title.ZIndex = 10
- Title.Text = Shown[queue].Name
- Title.TextSize = text_TitleTextSize
- Title.Font = text_TitleFont
- Title.TextColor3 = text_Color
- Title.TextStrokeColor3 = Color3.new(1,1,1)
- Title.TextStrokeTransparency = 1
- Title.TextYAlignment = 'Bottom'
- local TextShadow = Shadow:Clone()
- TextShadow.Parent = Title
- TextShadow.ZIndex = 9
- if Shown[queue].HasIcon.Value then
- local Icon = Instance.new('TextLabel', Frame)
- Icon.Name = 'Label_Icon'
- Icon.BackgroundColor3 = BackgroundColor2
- Icon.BackgroundTransparency = 1
- Icon.Position = UDim2.new(0,0,0.5,0)
- Icon.BorderSizePixel = 0
- Icon.Size = UDim2.new(0.125,0,.5,0)
- Icon.ZIndex = 8
- Icon.Text = Shown[queue].Icon.Value
- Icon.TextSize = text_IconTextSize
- Icon.Font = text_TitleFont
- Icon.TextColor3 = text_Color
- Icon.TextStrokeColor3 = Color3.new(1,1,1)
- Icon.TextStrokeTransparency = 1
- Icon.TextYAlignment = 'Center'
- local Display = Instance.new('TextLabel', Frame)
- Display.Name = 'Label_Display'
- Display.BackgroundColor3 = BackgroundColor2
- Display.BackgroundTransparency = 1
- Display.Position = UDim2.new(0.125,0,0.5,0)
- Display.BorderSizePixel = 0
- Display.Size = UDim2.new(0.875,0,.5,0)
- Display.ZIndex = 8
- Display.TextSize = text_DisplayTextSize
- Display.Font = text_TitleFont
- Display.TextColor3 = text_Color
- Display.TextStrokeColor3 = Color3.new(1,1,1)
- Display.TextStrokeTransparency = 1
- Display.TextXAlignment = 'Left'
- if Shown[queue].IsCurrency.Value then
- Display.Text = process(Shown[queue].Value)
- maintain(Display, Shown[queue])
- table.insert(maintainDisplaylist, Display)
- table.insert(maintainStatlist, Shown[queue])
- else
- Display.Text = Shown[queue].Value
- end
- else
- local Display = Instance.new('TextLabel', Frame)
- Display.Name = 'Label_Display'
- Display.BackgroundColor3 = BackgroundColor2
- Display.BackgroundTransparency = 1
- Display.Position = UDim2.new(0,0,0.5,0)
- Display.BorderSizePixel = 0
- Display.Size = UDim2.new(1,0,.5,0)
- Display.ZIndex = 8
- Display.TextSize = text_DisplayTextSize
- Display.Font = text_TitleFont
- Display.TextColor3 = text_Color
- Display.TextStrokeColor3 = Color3.new(1,1,1)
- Display.TextStrokeTransparency = 1
- Display.TextYAlignment = 'Left'
- if Shown[queue].IsCurrency.Value then
- Display.Text = process(Shown[queue].Value)
- maintain(Display, Shown[queue])
- table.insert(maintainDisplaylist, Display)
- table.insert(maintainStatlist, Shown[queue])
- else
- Display.Text = Shown[queue].Value
- end
- end
- end
- local team_Frame = Instance.new('Frame', stat_Frame)
- team_Frame.BackgroundColor3 = BackgroundColor2
- team_Frame.BorderSizePixel = 0
- team_Frame.Name = ("Frame_Team")
- team_Frame.Size = UDim2.new(1,0,0,90)
- team_Frame.Position = UDim2.new(0,0,0,36 + (60*(queue)))
- team_Frame.ZIndex = 8
- local team_Shadow = team_Frame:Clone()
- team_Shadow.Parent = team_Frame
- team_Shadow.Name = 'Frame_Shadow'
- team_Shadow.Style = Enum.FrameStyle.DropShadow
- team_Shadow.Size = UDim2.new(1,6,1,6)
- team_Shadow.Position = UDim2.new(0,-3,0,-3)
- team_Shadow.ZIndex = 7
- local team_Title = Instance.new('TextLabel', team_Frame)
- team_Title.Name = 'Label_Name'
- team_Title.BackgroundColor3 = BackgroundColor1
- team_Title.BorderSizePixel = 0
- team_Title.Size = UDim2.new(1,0,0,30)
- team_Title.ZIndex = 10
- team_Title.Text = 'Occupation'
- team_Title.TextSize = text_TitleTextSize
- team_Title.Font = text_TitleFont
- team_Title.TextColor3 = text_Color
- team_Title.TextStrokeColor3 = Color3.new(1,1,1)
- team_Title.TextStrokeTransparency = 1
- team_Title.TextYAlignment = 'Bottom'
- local team_TitleShadow = team_Shadow:Clone()
- team_TitleShadow.Parent = team_Title
- team_TitleShadow.Name = 'Frame_Shadow'
- team_TitleShadow.Style = Enum.FrameStyle.DropShadow
- team_TitleShadow.Size = UDim2.new(1,6,1,6)
- team_TitleShadow.Position = UDim2.new(0,-3,0,-3)
- team_TitleShadow.ZIndex = 8
- local team_Display = Instance.new('TextLabel', team_Frame)
- team_Display.Name = 'Label_Display'
- team_Display.BackgroundColor3 = BackgroundColor2
- team_Display.BackgroundTransparency = 1
- team_Display.Position = UDim2.new(0,0,0,30)
- team_Display.BorderSizePixel = 0
- team_Display.Size = UDim2.new(1,0,0,30)
- team_Display.ZIndex = 8
- team_Display.TextSize = text_DisplayTextSize
- team_Display.Font = text_TitleFont
- team_Display.TextColor3 = text_Color
- team_Display.TextStrokeColor3 = Color3.new(1,1,1)
- team_Display.TextStrokeTransparency = 1
- team_Display.TextXAlignment = 'Center'
- team_Display.Text = game.Players.LocalPlayer.Team.Name
- local team_Display2 = Instance.new('TextLabel', team_Frame)
- team_Display2.Name = 'Label_Display2'
- team_Display2.BackgroundColor3 = BackgroundColor3
- team_Display2.BackgroundTransparency = 0
- team_Display2.Position = UDim2.new(0,0,0,60)
- team_Display2.BorderSizePixel = 0
- team_Display2.Size = UDim2.new(1,0,0,30)
- team_Display2.ZIndex = 8
- team_Display2.TextSize = text_DisplayTextSize
- team_Display2.Font = text_TitleFont
- team_Display2.TextColor3 = text_Color
- team_Display2.TextStrokeColor3 = Color3.new(1,1,1)
- team_Display2.TextStrokeTransparency = 1
- team_Display2.TextXAlignment = 'Center'
- team_Display2.Text = ("$"..(game.Players.LocalPlayer.Team.Folder_TeamStats.PayRate.Value) .. " / Hr")
- local leaderstats = game.Players.LocalPlayer:WaitForChild('leaderstats')
- if leaderstats.TopBarEnabled.Value == false then
- spawn(function ()
- while not pcall(StarterGui.SetCore,StarterGui,"TopbarEnabled",false) do
- wait()
- end
- end)
- end
- local queue = 0
- game.Players.PlayerAdded:connect(function(player)
- local playerlabel = {}
- print(player.Name)
- for _,i in pairs(players_Frame:GetChildren()) do
- queue = queue + 1
- if i.Text == player.Name then
- table.insert(playerlabel, i)
- else
- return
- end
- if #playerlabel == 0 then
- local player_name = Instance.new('TextLabel', players_Frame)
- player_name.Text = player.Name
- player_name.BackgroundColor3 = Color3.fromRGB(255,255,255)
- player_name.BackgroundTransparency = .5
- player_name.BorderSizePixel = 0
- player_name.Size = UDim2.new(1,0,0,30)
- player_name.Font = Enum.Font.SourceSansBold
- player_name.TextSize = '25'
- player_name.TextColor3 = text_Color
- player_name.Name = 'Player'..(queue)
- player_name.Position = UDim2.new(0,0,0, 30*queue-30)
- player_name.ClipsDescendants = true
- players_Frame.CanvasSize = UDim2.new(0,0,2,(30*queue))
- players_Frame.Position = UDim2.new(1,-205,0, 196)
- else
- return
- end
- end
- end)
- game.Players.PlayerRemoving:connect(function(player)
- for _,i in pairs(players_Frame:GetChildren()) do
- if i.Text == player.Name then
- i:Destroy()
- queue = queue - 1
- end
- end
- end)
- while true do
- wait()
- maintain(maintainDisplaylist[1], maintainStatlist[1])
- game.Players.LocalPlayer.PlayerGui:WaitForChild('UI').Frame_HUD:WaitForChild('Frame_Stats').Frame_Team.Label_Display2.Text = ("$"..(game.Players.LocalPlayer.Team.Folder_TeamStats.PayRate.Value) .. " / Hr")
- game.Players.LocalPlayer.PlayerGui:WaitForChild('UI').Frame_HUD:WaitForChild('Frame_Stats').Frame_Team.Label_Display.Text = game.Players.LocalPlayer.Team.Name
- end
- print('Shown: '..#Shown..' Hidden: '..#Hidden)
Advertisement
Add Comment
Please, Sign In to add comment