--function of all111

click.MouseClick:connect(function(player)
	if ready == true then 
		ready = false
		click.MaxActivationDistance = 0
		coverdown()
		menuappear()
		local newtool = tool:clone()
		local newhandle = handle:clone()
		newtool.Parent = sp.Temporary
		newhandle.Parent = sp.Temporary
		newhandle.CFrame = CFrame.new(Vector3.new(newhandle.Position.X, newhandle.Position.Y+1,newhandle.Position.Z))
		
		for _,one in pairs(maingui:GetChildren()) do
				if one:IsA("TextButton") then
					one.MouseButton1Down:connect(function()
						menudisappear()
						newtool.Name = one.Name
						for _,frame in pairs(maingui:GetChildren()) do
							if frame:IsA("Frame") and frame.Name == one.Name then --lol this whole part though
								for _,button in pairs(frame:GetChildren()) do
									if button:IsA("TextButton") then
										button.Visible = true
										button.MouseButton1Down:connect(function()
											newtool.ToolTip = button.Name
											newhandle.Parent = newtool
											newhandle.Anchored = false
											newtool.Cup.Disabled = false
											newtool.Parent = player.Backpack
											coverup()
											for _,v in pairs(button.Parent:GetChildren()) do
												if v:IsA("TextButton") then
													v.Visible = false
												end
											end
											click.MaxActivationDistance = 10
											wait(5)
											ready = true
											script.Fixer.Disabled = false
										end)
									end
								end
							end
						end
					end)
				end
		end
	end
end)

