Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables--
- local updatetime = 3
- local players = game:GetService("Players")
- local placeholder = "rbxassetid://0"
- playeramount = 0
- --Makes the part where everythings gona be--
- local mainpart = Instance.new("Part")
- mainpart.Parent = workspace
- mainpart.Name = "mainpart"
- mainpart.Size = Vector3.new(15, 10, 0.2)
- mainpart.CFrame = owner.Character.HumanoidRootPart.CFrame
- mainpart.Color = Color3.new(0.1, 0.1, 0.1)
- mainpart.Anchored = true
- --Makes the screen where the text is gonna be
- local screen = Instance.new("SurfaceGui")
- screen.Name = "screen"
- screen.Parent = mainpart
- screen.Adornee = mainpart
- --scrolly--
- local scrolly = Instance.new("ScrollingFrame")
- scrolly.Parent = screen
- scrolly.Size = UDim2.new(1, 0, 1, 0)
- scrolly.AutomaticCanvasSize = 3
- scrolly.BackgroundTransparency = 1
- --Makes the player name--
- local function createlabel(plrname, plramount)
- local label = Instance.new("TextLabel")
- label.Parent = scrolly
- label.Name = plrname
- label.Size = UDim2.new(0.25, 0, 0.1, 0)
- label.Text = plrname
- label.Position = UDim2.new(0.15, 0, 0.1*(plramount-1))
- label.TextScaled = true
- label.BackgroundTransparency = 0.9
- label.TextColor3 = Color3.new(0.85, 0.85, 0.85)
- end
- --fetches the account data(ripped this off of the forums cuz idk anything about os stuff)--
- local function getAccountDate(plr)
- local ageSec = (plr.AccountAge)*86400
- local createTime = os.time()-ageSec
- local date = os.date("%x",createTime)
- return tostring(date)
- end
- --makes the time labels--
- local function createtimelabel(plr, plramount)
- local label = Instance.new("TextLabel")
- label.Parent = scrolly
- label.Name = "time "..plr.Name
- label.Size = UDim2.new(0.15, 0, 0.1, 0)
- label.Text = "Created on: "..getAccountDate(plr)
- label.Position = UDim2.new(0.45, 0, 0.1*(plramount-1))
- label.TextScaled = true
- label.BackgroundTransparency = 0.9
- label.TextColor3 = Color3.new(0.85, 0.85, 0.65)
- end
- --Makes the profile image thingy--
- local function createprofile(plrname, plrid, plramount)
- local label = Instance.new("ImageLabel")
- label.Parent = scrolly
- label.Name = plrname.."'s profile"
- label.Image = players:GetUserThumbnailAsync(plrid, Enum.ThumbnailType.AvatarBust, Enum.ThumbnailSize.Size420x420)
- label.Size = UDim2.new(0.1, 0, 0.1, 0)
- label.Position = UDim2.new(0, 0, 0.1*(plramount-1))
- local corner = Instance.new("UICorner")
- corner.Parent = label
- end
- --Adds players who are in the server when the script is ran--
- for _, v in pairs(players:GetChildren()) do
- createlabel(v.Name, _)
- createprofile(v.Name, v.UserId, _)
- createtimelabel(v, _)
- playeramount = _ + 1
- end
- --Adds players who join the server after the script is ran--
- players.ChildAdded:Connect(function(plr)
- createlabel(plr.Name, playeramount)
- createprofile(plr.Name, plr.UserId, playeramount)
- createtimelabel(plr, playeramount)
- playeramount += 1
- end)
- --removes them when they leave--
- players.ChildRemoved:Connect(function(plr)
- --wip gotta fix this
- local plrname = plr.Name
- scrolly:FindFirstChild(plrname.."'s profile"):Destroy()
- scrolly:FindFirstChild("time "..plrname):Destroy()
- scrolly:FindFirstChild(plrname):Destroy()
- playeramount -= 1
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement