rblxdevofficial

SImulator PART 3.5/4 | HANDLER

Jul 11th, 2021
1,055
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. ---- Variables ----
  2.  
  3. local frame = script.Parent.Frame
  4. local close = script.Parent.Frame.CloseBTN
  5. local scrframe = script.Parent.Frame.ScrollingFrame
  6. local remote = game.ReplicatedStorage.Remotes.OpenShop
  7.  
  8. ---- Variables ----
  9.  
  10. --ON SCREEN = (INSERT, YOUR'S, HERE)
  11. --OFF SCREEN = (INSERT, YOUR'S, HERE)
  12.  
  13. ---- Handler ----
  14.  
  15. remote.OnClientEvent:Connect(function()
  16.    
  17.     frame.Visible = true
  18.     frame:TweenPosition(UDim2.new(ON SCREEN POSITION HERE),Enum.EasingDirection.Out,Enum.EasingStyle.Sine,.7,false)
  19.    
  20. end)
  21.  
  22. close.MouseButton1Click:Connect(function()
  23.    
  24.     frame:TweenPosition(UDim2.new(OFF SCREEN POSITION HERE),Enum.EasingDirection.Out,Enum.EasingStyle.Sine,.7,true)
  25.     wait(.7)
  26.     frame.Visible = false
  27.    
  28. end)
  29.  
  30. ---- Handler ----
  31.  
  32. ----Run Cleanup----
  33.  
  34. frame.Position = UDim2.new(OFF SCREEN POSITION HERE)
  35. frame.Visible = false
  36.  
  37. ----Run Cleanup----
Advertisement
Add Comment
Please, Sign In to add comment