BumpyPlayz

Gui Button Script GA

Nov 19th, 2019
4,801
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local open = false
  2. local debounce = true
  3.  
  4. script.Parent.MouseButton1Click:Connect(function()
  5.     if open == false and debounce == true then
  6.         open = true
  7.         debounce = false
  8.         script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.217, 0,0.246, 0), "Out", "Sine", 0.5)
  9.         wait(0.5)
  10.         debounce = true
  11.     elseif open == true and debounce == true then
  12.         open = false
  13.         debounce = false
  14.         script.Parent.Parent.Frame:TweenPosition(UDim2.new(1,0,0.246,0), "Out", "Sine", 0.5)
  15.         wait(0.5)
  16.         debounce = true
  17.     end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment