Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local plrgui = script.Parent.Parent.Parent.BackgroundManagement.Background.FGBG
- script.Parent.Visible = true
- local function onPlayerAdded(player)
- if player ~= game.Players.LocalPlayer then
- local nplr = Instance.new("TextLabel")
- nplr.Parent = plrgui
- nplr.BackgroundTransparency = 1
- nplr.Text = "[+]"..player.Name.." joined!"
- nplr.Size = UDim2.new(0, 250, 0, 50)
- nplr.Position = UDim2.new(0, 0, 0.2, 0)
- nplr.TextScaled = true
- nplr.ZIndex = 100
- nplr.TextColor3 = Color3.new(255, 241, 43)
- nplr.Font = "Cartoon"
- local tweenInfo1 = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
- local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 2)
- local goal1 = {}
- goal1.Position = UDim2.new(0, 0, -0.1, 0)
- local goal = {}
- goal.TextTransparency = 1
- local tween1 = game:GetService("TweenService"):Create(nplr, tweenInfo1, goal1)
- local tween = game:GetService("TweenService"):Create(nplr, tweenInfo, goal)
- wait()
- tween:Play()
- tween1:Play()
- wait(10)
- nplr:Destroy()
- end
- end
- local function onPlayerLeave(player)
- local nplr = Instance.new("TextLabel")
- nplr.Parent = plrgui
- nplr.BackgroundTransparency = 1
- nplr.Text = "[-]"..player.Name.." left!"
- nplr.Size = UDim2.new(0, 250, 0, 50)
- nplr.Position = UDim2.new(0, 0, 0.2, 0)
- nplr.TextScaled = true
- nplr.ZIndex = 100
- nplr.TextColor3 = Color3.new(255, 241, 43)
- nplr.Font = "Cartoon"
- local tweenInfo1 = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
- local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 2)
- local goal1 = {}
- goal1.Position = UDim2.new(0, 0, -0.1, 0)
- local goal = {}
- goal.TextTransparency = 1
- local tween1 = game:GetService("TweenService"):Create(nplr, tweenInfo1, goal1)
- local tween = game:GetService("TweenService"):Create(nplr, tweenInfo, goal)
- wait()
- tween:Play()
- tween1:Play()
- wait(10)
- nplr:Destroy()
- end
- game.Players.PlayerRemoving:Connect(onPlayerLeave)
- game.Players.PlayerAdded:Connect(onPlayerAdded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement