abusabIe

tweengames

May 27th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. local guiObject = script.Parent.Parent.Parent.Games
  2.  
  3.  
  4. local function callback(didComplete)
  5. if didComplete then
  6. print("The tween completed successfully")
  7. else
  8. print("The tween was cancelled")
  9. end
  10. end
  11.  
  12. local willTween = guiObject:TweenSize(
  13. UDim2.new(0, 205,0, 19), -- endSize (required)
  14. Enum.EasingDirection.In, -- easingDirection (default Out)
  15. Enum.EasingStyle.Sine, -- easingStyle (default Quad)
  16. 2, -- time (default: 1)
  17. true, -- should this tween override ones in-progress? (default: false)
  18. callback -- a function to call when the tween completes (default: nil)
  19. )
  20.  
  21. wait(2.50)
  22.  
  23. script.Parent.Parent.Parent.Games.Visible = false
  24.  
  25. wait(0.1)
  26.  
  27. script.Parent.Parent.Parent.MainTab.Visible = true
  28. local guiObject = script.Parent.Parent.Parent.MainTab
  29.  
  30.  
  31. local function callback(didComplete)
  32. if didComplete then
  33. print("The tween completed successfully")
  34. else
  35. print("The tween was cancelled")
  36. end
  37. end
  38.  
  39. local willTween = guiObject:TweenSize(
  40. UDim2.new(0, 476,0, 209), -- endSize (required)
  41. Enum.EasingDirection.In, -- easingDirection (default Out)
  42. Enum.EasingStyle.Sine, -- easingStyle (default Quad)
  43. 2, -- time (default: 1)
  44. true, -- should this tween override ones in-progress? (default: false)
  45. callback -- a function to call when the tween completes (default: nil)
  46. )
  47.  
  48. if willTween then
  49. print("The GuiObject will tween")
  50. else
  51. print("The GuiObject will not tween")
  52.  
  53. if willTween then
  54. print("The GuiObject will tween")
  55. else
  56. print("The GuiObject will not tween")
  57. end
  58. end
Advertisement
Add Comment
Please, Sign In to add comment