Advertisement
Guest User

PlayClient - Tree

a guest
Apr 1st, 2020
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. local camera = workspace.CurrentCamera
  2. local mainMenuMap = workspace:WaitForChild("MainMenuMap")
  3. local tweenService = game:GetService("TweenService")
  4. local btn = script.Parent
  5. local rStorage = game:GetService("ReplicatedStorage")
  6. local rEvents = rStorage:WaitForChild("RemoteEvents")
  7.  
  8. function tweenCamera(pos,tweenTime)
  9. tweenService:Create(camera,TweenInfo.new(tweenTime,Enum.EasingStyle.Linear),{CFrame = pos.CFrame}):Play()
  10. end
  11.  
  12. btn.MouseButton1Click:Connect(function()
  13. btn.Visible = false
  14. btn.Parent.Title.Visible = false
  15. btn.Parent.ShopBTN.Visible = false
  16. btn.Parent.ReturnShopBtn.Visible = false
  17. btn.Parent.ReturnMenu.Visible = true
  18.  
  19. tweenCamera(mainMenuMap.Camera2,1)
  20. wait(1)
  21.  
  22.  
  23. local intermissionFrame = btn.Parent:WaitForChild("IntermissionFrame")
  24. intermissionFrame.Visible = true
  25. rEvents.AddPlayer:FireServer()
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement