Advertisement
Sungmingamerpro13

EndScript (STORY GAME)

Oct 6th, 2023
1,006
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.99 KB | Source Code | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local TeleportService = game:GetService("TeleportService")
  3. local player = game.Players.LocalPlayer
  4. local EndEvent = game.ReplicatedStorage.EndEvent
  5. local MainGui = player.PlayerGui.ScreenGui
  6.  
  7. local function teleportToLobby()
  8.     TeleportService:Teleport(--[[YOURGAMEIDHERE]])
  9. end
  10.  
  11. EndEvent.OnClientEvent:Connect(function()
  12.     local goal_blur = {}
  13.     local goal_logo = {}
  14.     local blurEffect = Instance.new("BlurEffect", workspace.CurrentCamera)
  15.     goal_blur.Size = 15
  16.     goal_logo.Size = UDim2.new(0.5,0,0.5,0)
  17.    
  18.     blurEffect.Size = 0
  19.     MainGui.End.logo.Size = UDim2.new(0,0,0,0)
  20.     MainGui.End.Visible = true
  21.    
  22.     local tweenInfo_start = TweenInfo.new(2)
  23.     local tweenInfo_logo = TweenInfo.new(3)
  24.    
  25.     local tween_blur = TweenService:Create(blurEffect, tweenInfo_start, goal_blur)
  26.     local tween_logo = TweenService:Create(MainGui.End.logo, tweenInfo_logo, goal_logo)
  27.     tween_blur:Play()
  28.     wait(2)
  29.     tween_logo:Play()
  30.     wait(13)
  31.     teleportToLobby()
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement