Advertisement
XxxLloyd061302xxX

Button Script [Must be in LocalScript]

May 29th, 2018
5,035
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local blur = Instance.new("BlurEffect",game.Workspace.CurrentCamera)
  2. blur.Size = 0
  3. local frame = script.Parent.Parent:WaitForChild("Frame")
  4. local open = script.Parent.Parent.Open
  5.  
  6. script.Parent.MouseButton1Click:connect(function()
  7. if open.Value == false then
  8. frame:TweenPosition(UDim2.new(0.5,-250,0.5,-175),"Out","Quint",1,true)
  9. for i = 0,10,1 do
  10. wait()
  11. blur.Size = i
  12. end
  13. open.Value = true
  14. elseif open.Value == true then
  15. frame:TweenPosition(UDim2.new(0.5,-250,-0.5,-175),"Out","Quint",1,true)
  16. for i = 10,0,-1 do
  17. wait()
  18. blur.Size = i
  19. end
  20. open.Value = false
  21. end
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement