Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.materializeb = function(buttons, color, transp, speed)
- for i,button in pairs(buttons) do
- local parent = button
- local circlecolor = color or parent.TextColor3
- local ripplespeed = speed or 0.8
- local transparency = transp or 0.85
- button = button or script.Parent
- color = color or parent.TextColor3
- speed = speed or 0.8
- transp = transp or 0.85
- local mouse = game.Players.LocalPlayer:GetMouse()
- local diagonal = math.sqrt((parent.Size.X.Offset) ^ 2 + (parent.Size.Y.Offset) ^ 2)
- parent.ClipsDescendants = true
- parent.Active = true
- parent.Selectable = true
- parent.Visible = true
- parent.AutoButtonColor = false
- -- Object and Properties
- local circle = Instance.new("ImageLabel")
- circle.Name = "CircleLabel"
- circle.Parent = parent
- circle.AnchorPoint = Vector2.new(0.5, 0.5)
- circle.BackgroundColor3 = Color3.new(1,1,1)
- circle.BackgroundTransparency = 1
- circle.BorderSizePixel = 0
- circle.Position = UDim2.new(0,0,0,0)
- circle.Size = UDim2.new(0,50,0,50)
- circle.Visible = false
- circle.Image = "rbxassetid://200182847"
- circle.ImageColor3 = circlecolor
- parent.MouseButton1Down:connect(function()
- --Script
- local x = (mouse.X) - (parent.AbsolutePosition.X)
- local y = (mouse.Y) - (parent.AbsolutePosition.Y)
- circle.Position = UDim2.new(0,x,0,y)
- circle.Size = UDim2.new(0,5,0,5) -- edit this to make it bigger before animation
- circle.ImageTransparency = transparency
- circle.Visible = true
- wait()
- circle:TweenSize(
- UDim2.new(0, diagonal * 2, 0, diagonal * 2),
- "Out",
- "Quad",
- ripplespeed
- )
- end)
- parent.MouseButton1Up:connect(function()
- wait(0.3)
- local TweenService = game:GetService("TweenService")
- local circ = circle
- local Info = TweenInfo.new(
- 0.2, -- changes length of fading circle
- Enum.EasingStyle.Linear,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- local Goals =
- {
- ImageTransparency = 1;
- }
- local tween = TweenService:Create(circ,Info,Goals)
- tween:Play()
- end)
- end
- end
- _G.materializet = function(textbox, color, revertedtext)
- local parent = textbox
- local mouse = game.Players.LocalPlayer:GetMouse()
- local underlinecolor = color or parent.TextColor3
- local ptext = revertedtext or "TextBox"
- local xsize = parent.Size.X.Offset
- local ysize = parent.Size.Y.Offset
- parent.Visible = true
- parent.Active = true
- parent.Selectable = true
- local Underline = Instance.new("Frame")
- local UnderlineBase = Instance.new("Frame")
- Underline.Name = "Underline"
- Underline.Parent = parent
- Underline.BackgroundColor3 = underlinecolor
- Underline.BorderSizePixel = 0
- Underline.Position = UDim2.new(0, 0, 1, 0)
- Underline.Size = UDim2.new(0, 0, 0, 2)
- UnderlineBase.Name = "UnderlineBase"
- UnderlineBase.Parent = parent
- UnderlineBase.BackgroundColor3 = underlinecolor
- UnderlineBase.BackgroundTransparency = 0.85
- UnderlineBase.BorderSizePixel = 0
- UnderlineBase.Position = UDim2.new(0, 0, 1, 0)
- UnderlineBase.Size = UDim2.new(0, xsize, 0, 1)
- parent.Focused:connect(function()
- local x = (mouse.X) - (parent.AbsolutePosition.X)
- Underline.BackgroundTransparency = 0
- Underline.Position = UDim2.new(0,x,1,0)
- wait()
- Underline:TweenSizeAndPosition(
- UDim2.new(0, xsize, 0, 1),
- UDim2.new(0, 0, 1, 0),
- "Out",
- "Quint",
- 0.2
- )
- end)
- parent.FocusLost:connect(function()
- if parent.Text == "" then
- parent.Text = ptext
- end
- local TweenService = game:GetService("TweenService")
- local Info = TweenInfo.new(
- 0.15,
- Enum.EasingStyle.Linear,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- local Goals =
- {
- BackgroundTransparency = 1;
- }
- local tween = TweenService:Create(Underline,Info,Goals)
- tween:Play()
- wait(0.15)
- Underline.Size = UDim2.new(0,0,0,1)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement