Tool=script.Parent local F=nil local G=nil local h={}local l={}function Equip(l)wait(.01)F={Tool.Parent:FindFirstChild("\076\101\102\116 \065\114\109");Tool.Parent:FindFirstChild("\082\105\103\104\116 \065\114\109")}G=Tool.Parent:FindFirstChild("\084\111\114\115\111")if F~=nil and G~=nil then local l={G:FindFirstChild("\076\101\102\116 \083\104\111\117\108\100\101\114");G:FindFirstChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")}if l~=nil then local d=true if d then d=false l[1].Part1=nil l[2].Part1=nil local o=Instance.new("\087\101\108\100")o.Part0=G o.Parent=G o.Part1=F[1]o.C1=CFrame.new(-0.5,.5,1.5)*CFrame.fromEulerAnglesXYZ(math.rad(270),0,math.rad(-90))h[1]=o local O=Instance.new("\087\101\108\100")O.Part0=G O.Parent=G O.Part1=F[2]O.C1=CFrame.new(-1.5,.5,.5)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),0)h[2]=O end else print("\115\104")end else print("\097\114\109\115")end end function Unequip(l)if F~=nil and G~=nil then local l={G:FindFirstChild("\076\101\102\116 \083\104\111\117\108\100\101\114"),G:FindFirstChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")}if l~=nil then local G=true if G then G=false l[1].Part1=F[1]l[2].Part1=F[2]h[1].Parent=nil h[2].Parent=nil end else print("\115\104")end else print("\097\114\109\115")end end function Weld(F,G)local h=Instance.new("\087\101\108\100")h.Part0=F h.Part1=G local l=CFrame.new(F.Position)local d=F.CFrame:inverse()*l local o=G.CFrame:inverse()*l h.C0=d h.C1=o h.Parent=F end function Get(F)if F.Name=="\080\097\114\116"then Weld(script.Parent.Handle,F)F.Anchored=false else local G=F:GetChildren()for F=1,#G,1 do Get(G[F])end end end function Finale()Get(script.Parent)end function l.new(F)local G={}G.Equipped:connect(Finale)G.Unequipped:connect(Finale)Finale()G.Equipped:connect(Equip)G.Unequipped:connect(Unequip)end return l
Tool = script.Parent
local arms = nil
local torso = nil
local welds = {}
local module = {}


function Equip(mouse)
    wait(0.01)
    arms = {
        Tool.Parent:FindFirstChild("Left Arm"),
        Tool.Parent:FindFirstChild("Right Arm")
    }
    torso = Tool.Parent:FindFirstChild("Torso")
    if arms ~= nil and torso ~= nil then
        local sh = {
            torso:FindFirstChild("Left Shoulder"),
            torso:FindFirstChild("Right Shoulder")
        }
        if sh ~= nil then
            local yes = true
            if yes then
                yes = false
                sh[1].Part1 = nil
                sh[2].Part1 = nil
                local weld1 = Instance.new("Weld")
                weld1.Part0 = torso
                weld1.Parent = torso
                weld1.Part1 = arms[1]
                weld1.C1 = CFrame.new(-0.5, 0.5, 1.5) *
                               CFrame.fromEulerAnglesXYZ(math.rad(270), 0,
                                                         math.rad(-90))
                welds[1] = weld1
                local weld2 = Instance.new("Weld")
                weld2.Part0 = torso
                weld2.Parent = torso
                weld2.Part1 = arms[2]
                weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) *
                               CFrame.fromEulerAnglesXYZ(math.rad(-90),
                                                         math.rad(0), 0)
                welds[2] = weld2
            end
        else
            print("sh")
        end
    else
        print("arms")
    end
end

function Unequip(mouse)
    if arms ~= nil and torso ~= nil then
        local sh = {
            torso:FindFirstChild("Left Shoulder"),
            torso:FindFirstChild("Right Shoulder")
        }
        if sh ~= nil then
            local yes = true
            if yes then
                yes = false
                sh[1].Part1 = arms[1]
                sh[2].Part1 = arms[2]
                welds[1].Parent = nil
                welds[2].Parent = nil
            end
        else
            print("sh")
        end
    else
        print("arms")
    end
end

function Weld(x,y)
	local W = Instance.new("Weld")
	W.Part0 = x
	W.Part1 = y
	local CJ = CFrame.new(x.Position)
	local C0 = x.CFrame:inverse()*CJ
	local C1 = y.CFrame:inverse()*CJ
	W.C0 = C0
	W.C1 = C1
	W.Parent = x
end

function Get(A)
	if A.Name == "Part" then
		Weld(script.Parent.Handle, A)
		A.Anchored = false
	else
		local C = A:GetChildren()
		for i=1, #C do
		Get(C[i])
		end
	end
end

function Finale()
	Get(script.Parent)
end


function module.new(toolModel)
    local tool = {}
    
    tool.Equipped:connect(Finale)
    tool.Unequipped:connect(Finale)
    Finale()
    tool.Equipped:connect(Equip)
    tool.Unequipped:connect(Unequip)
end

return module
