Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Objects
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local RippleEffect = Instance.new("TextButton")
- local ImageLabel = Instance.new("ImageLabel")
- local TextLabel = Instance.new("TextLabel")
- local Circle = Instance.new("ImageLabel")
- -- Properties
- ScreenGui.Parent = game.CoreGui
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame.BorderColor3 = Color3.new(0.811765, 0.811765, 0.811765)
- Frame.Position = UDim2.new(0.332812518, 0, 0.311621964, 0)
- Frame.Size = UDim2.new(0, 443, 0, 282)
- RippleEffect.Name = "RippleEffect"
- RippleEffect.Parent = Frame
- RippleEffect.BackgroundColor3 = Color3.new(1, 1, 1)
- RippleEffect.BorderColor3 = Color3.new(0.882353, 0.882353, 0.882353)
- RippleEffect.Position = UDim2.new(0.273137689, 0, 0.411347508, 0)
- RippleEffect.Size = UDim2.new(0, 200, 0, 50)
- RippleEffect.Font = Enum.Font.SourceSansLight
- RippleEffect.Text = "Press me for Ripple Effect"
- RippleEffect.TextColor3 = Color3.new(0, 0, 0)
- RippleEffect.TextScaled = true
- RippleEffect.TextSize = 14
- RippleEffect.TextWrapped = true
- ImageLabel.Parent = Frame
- ImageLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- ImageLabel.BackgroundTransparency = 1
- ImageLabel.Position = UDim2.new(0.182844251, 0, 0.0283687934, 0)
- ImageLabel.Size = UDim2.new(0, 280, 0, 100)
- ImageLabel.Image = "rbxassetid://1133305080"
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Position = UDim2.new(0.611738205, 0, 0.23404254, 0)
- TextLabel.Size = UDim2.new(0, 200, 0, 50)
- TextLabel.Font = Enum.Font.SourceSansLight
- TextLabel.Text = "Material Effect"
- TextLabel.TextColor3 = Color3.new(0, 0, 0)
- TextLabel.TextSize = 26
- TextLabel.TextWrapped = true
- Circle.Name = "Circle"
- Circle.Parent = RippleEffect
- Circle.BackgroundColor3 = Color3.new(1, 1, 1)
- Circle.BackgroundTransparency = 1
- Circle.ZIndex = 10
- Circle.Image = "rbxassetid://266543268"
- Circle.ImageColor3 = Color3.new(0, 0, 0)
- Circle.ImageTransparency = 0.5
- local Mouse = game.Players.LocalPlayer:GetMouse()
- local function CircleClick(RippleEffect, X, Y)
- RippleEffect.ClipsDescendants = true
- local Circle = Circle:Clone()
- Circle.Parent = RippleEffect
- local NewX = X - Circle.AbsolutePosition.X
- local NewY = Y - Circle.AbsolutePosition.Y
- Circle.Position = UDim2.new(0, NewX, 0, NewY)
- local Size = 0
- if RippleEffect.AbsoluteSize.X > RippleEffect.AbsoluteSize.Y then
- Size = RippleEffect.AbsoluteSize.X*1.5
- elseif RippleEffect.AbsoluteSize.X < RippleEffect.AbsoluteSize.Y then
- Size = RippleEffect.AbsoluteSize.Y*1.5
- elseif RippleEffect.AbsoluteSize.X == RippleEffect.AbsoluteSize.Y then print("This place uses a model by Come0n.") --please do not remove!
- Size = RippleEffect.AbsoluteSize.X*1.5
- end
- local Time = 0.5
- Circle:TweenSizeAndPosition(UDim2.new(0, Size, 0, Size), UDim2.new(0.5, -Size/2, 0.5, -Size/2), "Out", "Quad", Time, false, nil)
- for i=1,10 do
- Circle.ImageTransparency = Circle.ImageTransparency + 0.01
- wait(Time/10)
- end
- Circle:Destroy()
- end
- RippleEffect.MouseButton1Down:connect(function()
- CircleClick(RippleEffect, Mouse.X, Mouse.Y)
- end)
- local UserInputService,gui,dragging,dragInput,dragStart,startPos = game:GetService("UserInputService"),Frame
- local function update(input)
- local delta = input.Position - dragStart
- wait(0.1)
- gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- gui.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = gui.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- gui.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment