Joriangames

ToggleButton script

May 14th, 2022 (edited)
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. --[[
  2. Thanks for using this script
  3. This script was made by Joriangames/BloxianCode
  4. Want to know how to use this and script explanation?
  5. Check the video here: https://youtu.be/o80VXacZP9o
  6. ]]
  7. local frame = script.Parent.Parent.Frame
  8.  
  9. script.Parent.MouseButton1Click:Connect(function()
  10.    
  11.     if frame.Position == UDim2.new(0.5, 0,0.5, 0) then
  12.         frame:TweenPosition(UDim2.new(0.5,0,-0.5,0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, true)
  13.     else
  14.         frame:TweenPosition(UDim2.new(0.5,0,0.5,0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, true)
  15.     end
  16.    
  17. end)
Add Comment
Please, Sign In to add comment