Advertisement
Sungmingamerpro13

EndScript 2 (STORY GAME)

Oct 6th, 2023
1,203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.43 KB | Source Code | 0 0
  1. local TeleportService = game:GetService("TeleportService")
  2. local TweenService = game:GetService("TweenService")
  3. local player = game.Players.LocalPlayer
  4. local EndEvent = game.ReplicatedStorage.EndEvent
  5. local ScreenGui = player.PlayerGui.DialogueGui
  6. local End = ScreenGui.End
  7. local EndTransition = End.EndTransition
  8. local TransitionLogo = EndTransition.EndLogo
  9. local LobbyFrame = End.LobbyFrame
  10. local LobbyButton = LobbyFrame.LobbyButton
  11.  
  12. local LobbyId = 14983384835
  13.  
  14. local function TeleportToLobby()
  15.     TeleportService:Teleport(LobbyId)
  16. end
  17.  
  18. EndEvent.OnClientEvent:Connect(function(timer)
  19.     local goal_start = {}
  20.     local goal_start2 = {}
  21.     local goal_end = {}
  22.     local goal_end2 = {}
  23.     goal_start.BackgroundTransparency = 0
  24.     goal_end.BackgroundTransparency = 1
  25.     goal_start2.ImageTransparency = 0
  26.     goal_end2.ImageTransparency = 1
  27.     local tweenInfo = TweenInfo.new(2) -- add N time
  28.     local tweenInfo2 = TweenInfo.new(2)
  29.     local tween_start = TweenService:Create(EndTransition, tweenInfo, goal_start)
  30.     local tween_start2 = TweenService:Create(TransitionLogo, tweenInfo2, goal_start2)
  31.     local tween_end = TweenService:Create(EndTransition, tweenInfo, goal_end)
  32.     local tween_end2 = TweenService:Create(TransitionLogo, tweenInfo2, goal_end2)
  33.     wait(10)
  34.     tween_start:Play()
  35.     tween_start2:Play()
  36.     wait(3)
  37.     tween_end:Play()
  38.     tween_end2:Play()
  39.     LobbyFrame.Visible = true
  40.     LobbyButton.MouseButton1Click:Connect(function()
  41.         TeleportToLobby()
  42.     end)
  43. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement