Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent.Parent.Frame.Position = UDim2.new(0.199, 0,-1, 0)
- function open()
- local done = false
- repeat
- if script.Parent.Parent.Debounce.Value == false then
- done = true
- end
- wait(0.01)
- until done == true
- if script.Parent.Value == true then
- script.Parent.Parent.Debounce.Value = true
- script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.199, 0,0.198, 0), "Out", "Elastic", 2)
- wait(2)
- script.Parent.Parent.Debounce.Value = false
- end
- end
- function close()
- local done = false
- repeat
- if script.Parent.Parent.Debounce.Value == false then
- done = true
- end
- wait(0.01)
- until done == true
- if script.Parent.Value == false then
- script.Parent.Parent.Debounce.Value = true
- script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.199, 0,2, 0), "Out", "Elastic", 2)
- wait(2)
- script.Parent.Parent.Debounce.Value = false
- end
- end
- script.Parent.Changed:Connect(function()
- open()
- close()
- end)
Add Comment
Please, Sign In to add comment