Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Variables
- -- // Services
- local players = game:GetService("Players")
- local reps = game:GetService("ReplicatedStorage")
- -- // Instaces
- local sg = Instance.new('ScreenGui',owner:FindFirstChildWhichIsA'PlayerGui')
- sg.ResetOnSpawn = false
- local f1 = Instance.new('Frame',sg)
- f1.AnchorPoint = Vector2.new(.5,.5)
- f1.BackgroundColor3 = Color3.new(0,0,0)
- f1.BackgroundTransparency = .5
- f1.Position = UDim2.new(.5,0,.5,0)
- f1.Size = UDim2.new(.375,0,.5,0)
- f1.Active = true
- f1.Selectable = true
- local sf = Instance.new('ScrollingFrame',f1)
- sf.BackgroundColor3 = Color3.new(0,0,0)
- sf.Size = UDim2.new(.75,0,1,0)
- sf.ClipsDescendants = true
- sf.CanvasSize = UDim2.new(0,0,0,50)
- sf.ScrollingDirection = Enum.ScrollingDirection.Y
- local TLd = Instance.new("TextLabel",sf)
- TLd.BackgroundColor3 = Color3.new(0, 0, 0)
- TLd.Size = UDim2.new(1,0,0,50)
- TLd.Font = Enum.Font.Code
- TLd.Text = '[[ Start of Join Logs]]'
- TLd.TextColor3 = Color3.new(255, 255, 255)
- TLd.TextScaled = true
- local re1 = reps:FindFirstChild('AS_RE1',true)
- -- // Values
- local lognum = 0
- --// Default Properties
- sg.Enabled = true
- f1.Draggable = true
- f1.Position = UDim2.new(.5,0,.5,0)
- --// Functions
- local function Gui_In()
- f1:TweenPosition(UDim2.new(.5,0,.5,0))
- wait(1)
- f1.Draggable = true
- end
- local function Gui_Out()
- f1.Draggable = false
- if f1.Position~=UDim2.new(.5,0,.5,0)then
- f1:TweenPosition(UDim2.new(.5,0,.5,0))
- wait(1)
- end
- f1:TweenPosition(UDim2.new(1.25,0,.5,0))
- wait(1)
- end
- local function MakeLog(pl,msg)
- for _,v in pairs(sf:GetChildren())do
- local vpos = v.Position
- v.Position = UDim2.new(vpos.X.Scale,vpos.X.Offset,vpos.Y.Scale,vpos.Y.Offset + 50)
- end
- sf.CanvasSize = UDim2.new(sf.CanvasSize.X.Scale,sf.CanvasSize.X.Offset,sf.CanvasSize.Y.Scale,sf.CanvasSize.Y.Offset + 50)
- local TL = Instance.new("TextLabel",sf)
- TL.BackgroundColor3 = Color3.new(0, 0, 0)
- TL.Size = UDim2.new(1,0,0,50)
- TL.Font = Enum.Font.Code
- TL.Text = (pl.Name..' '..msg..'.')
- TL.TextColor3 = Color3.new(255, 255, 255)
- TL.TextScaled = true
- end
- --// Events
- --[[
- re1.OnClientEvent:Connect(function(arg1)
- if arg1=='GetGui'then
- Gui_In()
- elseif arg1=='DestroyGui'then
- Gui_Out()
- end
- end)
- --]]
- players.PlayerAdded:Connect(function(pl)
- MakeLog(pl,'joined')
- end)
- players.PlayerRemoving:Connect(function(pl)
- MakeLog(pl,'left')
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement