script:
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local mouse = plr:GetMouse()
local tween = game:GetService("TweenService")
local currentx = 75
local currenty = 75
local pos = script.Parent.Position
local module = require(game.ReplicatedStorage.GiveCards)
adb = false
db = false
local function changesize(obj, size)
local anim = tween:Create(script.Parent, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0), {Size = size})
return(anim)
end
local rs = game:GetService("RunService")
rs.RenderStepped:Connect(function()
wait()
if adb == false and script.Parent.Parent.Name == "PlrButtons" then
adb = true
script.Parent.Holder.Position = UDim2.new(0, script.Parent.Holder.Position.X.Offset, 0, script.Parent.Holder.Position.Y.Offset + 200)
script.Parent.Visible = true
script.Parent.Holder:TweenPosition(UDim2.new(0, script.Parent.Holder.Position.X.Offset, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.9)
script.Parent:TweenSize(UDim2.new(0,75,0,75), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.3)
end
end)
script.Parent.MouseEnter:Connect(function()
if db == true then
return
end
local anim = changesize(script.Parent, UDim2.new(0, currentx * 1, 0, currenty * 1.3))
anim:Play()
end)
script.Parent.MouseLeave:Connect(function()
if db == true then
return
end
local anim = changesize(script.Parent, UDim2.new(0, currentx * 1, 0, currenty * 1))
anim:Play()
end)
script.Parent.MouseButton1Click:Connect(function() --issues here
db = true
script.Parent:TweenSizeAndPosition(UDim2.new(0,0,0,75), UDim2.new(0, script.Parent.Holder.Position.X.Offset, 0, script.Parent.Holder.Position.Y.Offset + 200), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.5)
task.wait(0.7)
module.shuffle(script.Parent.Parent)
script.Parent:Destroy()
end)