SkeletalScripts

Minimize

Jun 12th, 2020
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. -- put this in minimize as a localscript
  2. local on = false
  3. local old
  4. script.Parent.MouseButton1Click:Connect(function()
  5.        
  6.  
  7.     if on == false then
  8.         on = true
  9.         old = script.Parent.Parent.Parent.Position
  10.         script.Parent.Parent.Parent:TweenPosition(UDim2.new(0.519, 0,0.94, 0),"Out","Linear",0.3,false,nil)
  11.         game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.3), {Rotation = 180}):Play()
  12.        
  13.     else
  14.         on = false
  15.         script.Parent.Parent.Parent:TweenPosition(old,"Out","Linear",0.3,false,nil)
  16.         game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.3), {Rotation = 0}):Play()
  17.     end
  18.     print(old)
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment