Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//VARIABLES
- local GUI = script.Parent
- local Gradient = GUI.UIGradient
- local ts = game:GetService("TweenService")
- local t1 = TweenInfo.new(1, Enum.EasingStyle.Circular, Enum.EasingDirection.InOut)
- local offset1 = {Offset = Vector2.new(1,0)}
- local create = ts:Create(Gradient, t1, offset1)
- local startingpos = Vector2.new(-1,0)
- local addWait = 0.5 -- Delay
- --//ANIMATION
- local function animate()
- create:Play()
- create.completed:wait() -- Waits for Tween To End
- Gradient.Offset = startingpos -- Resets Offset
- create:Play() -- Repeats Anim
- create.completed:wait()
- Gradient.Offset = startingpos
- wait(addWait)
- animate()
- end
- animate()
Advertisement
Add Comment
Please, Sign In to add comment