Er1x_Official

custom hotbar/toolbar local script

Apr 5th, 2022
2,864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local module = require(script.CustomHotbar)
  2. local hotbar = module.new(script.Parent:WaitForChild("Hotbar"),script:WaitForChild("Template"))
  3.  
  4. local tweens = game:GetService("TweenService")
  5. local sizes = {
  6.     normal = UDim2.fromScale(0.08,0.8),
  7.     goal = UDim2.fromScale(0.1,1)
  8. }
  9.  
  10. hotbar.Equipped:Connect(function(tool,frame)
  11.     local info = TweenInfo.new(.3,Enum.EasingStyle.Bounce)
  12.     tweens:Create(frame,info,{Size = sizes.goal, BackgroundTransparency = 0}):Play()
  13. end)
  14.  
  15. hotbar.Unequipped:Connect(function(tool,frame)
  16.     local info = TweenInfo.new(.3,Enum.EasingStyle.Bounce)
  17.     tweens:Create(frame,info,{Size = sizes.normal, BackgroundTransparency = .5}):Play()
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment