local TeleportService = game:GetService("TeleportService")
local TweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local EndEvent = game.ReplicatedStorage.EndEvent
local ScreenGui = player.PlayerGui.DialogueGui
local End = ScreenGui.End
local EndTransition = End.EndTransition
local TransitionLogo = EndTransition.EndLogo
local LobbyFrame = End.LobbyFrame
local LobbyButton = LobbyFrame.LobbyButton
local LobbyId = 14983384835
local function TeleportToLobby()
TeleportService:Teleport(LobbyId)
end
EndEvent.OnClientEvent:Connect(function(timer)
local goal_start = {}
local goal_start2 = {}
local goal_end = {}
local goal_end2 = {}
goal_start.BackgroundTransparency = 0
goal_end.BackgroundTransparency = 1
goal_start2.ImageTransparency = 0
goal_end2.ImageTransparency = 1
local tweenInfo = TweenInfo.new(2) -- add N time
local tweenInfo2 = TweenInfo.new(2)
local tween_start = TweenService:Create(EndTransition, tweenInfo, goal_start)
local tween_start2 = TweenService:Create(TransitionLogo, tweenInfo2, goal_start2)
local tween_end = TweenService:Create(EndTransition, tweenInfo, goal_end)
local tween_end2 = TweenService:Create(TransitionLogo, tweenInfo2, goal_end2)
wait(10)
tween_start:Play()
tween_start2:Play()
wait(3)
tween_end:Play()
tween_end2:Play()
LobbyFrame.Visible = true
LobbyButton.MouseButton1Click:Connect(function()
TeleportToLobby()
end)
end)