Advertisement
HowToRoblox

Button9Script

Jun 22nd, 2020
4,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local btn = script.Parent
  2. local pulseBtn = btn:WaitForChild("Pulse")
  3.  
  4. local tweenService = game:GetService("TweenService")
  5. local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
  6.  
  7. local function pulse()
  8.    
  9.     local pulseBtnClone = pulseBtn:Clone()
  10.     pulseBtnClone.Parent = btn
  11.    
  12.     local tweenFade = tweenService:Create(pulseBtnClone, tweenInfo, {ImageTransparency = 1})
  13.    
  14.     pulseBtnClone:TweenSize(UDim2.new(2, 0, 2, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quint, 1)
  15.     tweenFade:Play()
  16. end
  17.  
  18.  
  19. btn.MouseEnter:Connect(function()
  20.  
  21.     pulse()
  22. end)
  23.  
  24. btn.MouseButton1Down:Connect(function()
  25.    
  26.     pulse()
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement