Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---- Variables ----
- local frame = script.Parent.Frame
- local close = script.Parent.Frame.CloseBTN
- local scrframe = script.Parent.Frame.ScrollingFrame
- local remote = game.ReplicatedStorage.Remotes.OpenShop
- ---- Variables ----
- --ON SCREEN = (INSERT, YOUR'S, HERE)
- --OFF SCREEN = (INSERT, YOUR'S, HERE)
- ---- Handler ----
- remote.OnClientEvent:Connect(function()
- frame.Visible = true
- frame:TweenPosition(UDim2.new(ON SCREEN POSITION HERE),Enum.EasingDirection.Out,Enum.EasingStyle.Sine,.7,false)
- end)
- close.MouseButton1Click:Connect(function()
- frame:TweenPosition(UDim2.new(OFF SCREEN POSITION HERE),Enum.EasingDirection.Out,Enum.EasingStyle.Sine,.7,true)
- wait(.7)
- frame.Visible = false
- end)
- ---- Handler ----
- ----Run Cleanup----
- frame.Position = UDim2.new(OFF SCREEN POSITION HERE)
- frame.Visible = false
- ----Run Cleanup----
Advertisement
Add Comment
Please, Sign In to add comment